BOOL CSmtp::SendEnd() /*发送结尾信息*/
{
CString sendBuff;
sendBuff = ".\r\n";
return Send(sendBuff);
}
BOOL CSmtp::Send(CString &message)
{
int n = message.GetLength();
string msg = message.GetBuffer(n);
char msg_buff[10240] = { 0 };
strcpy(msg_buff, msg.c_str());
int err = send(sockClient, msg_buff, n, 0);
if (err == SOCKET_ERROR)
{
return FALSE;
}
cout << message << endl;
return TRUE;
}