return _T("Requested mail action okay, completed");
if(Response.Find("251"))
return _T("user not local: will forward to forward path");
if(Response.Find("354"))
return _T("Start mail input; end with <CRLF>.<CRLF>");
return _T("No Error Number is matched with ")+Response;
}
// Just overloading of the Mail method
BOOL CSMTP::Mail()
{
return Mail(m_From);
}
复制代码
下面是该类的使用举例:
CSMTP m_smtp;
m_smtp.Connect("khi.compol.com","aasif@khi.compol.com");
m_smtp.Mail("aasif@khi.compol.com");
m_smtp.SetTo("zafir@home.com");
m_smtp.Data("test message","This is a test message ... ");
m_smtp.Disconnect();