qt简单的邮件发送客户端

时间:2014-03-10 04:02:09
【文件属性】:
文件名称:qt简单的邮件发送客户端
文件大小:3KB
文件格式:RAR
更新时间:2014-03-10 04:02:09
qt 邮件发送 #include "smtpclient.h" #include #include #include #include #include #include #include enum SMTPCMD{SMTP_EHLO = 0 , SMTP_AUTHLOGIN , SMTP_MAIL , SMTP_RCPT , SMTP_DATA , SMTP_QUIT}; struct SmtpClientData { SmtpClientData() : hostName("") , hostPort(0) , userName("") , userPassword("") , sender("") , receiver("") , subject("") , content("") , attachments("") , socket(0) , stream(0) , totalSize(0) , sentSize(1) { } QString hostName; // smtp.hikvision.com.cn unsigned int hostPort; // 25 as usual QString userName; // test@hikvision.com.cn QString userPassword; // test QString sender; // from QString receiver; // to QString subject; // abstract title QString content; // rich text QStringList attachments;// paths of attachments QTcpSocket *socket; // smtp socket QTextStream *stream; // text-stream for socket qint64 totalSize; // total size of mail containing text and attachments qint64 sentSize; // size already sent };
【文件预览】:
smtpclient.cpp
smtpclient.h

网友评论

  • 资源一般,不能用
  • 勉强可以用,比较简洁
  • 很好,挺有用
  • 支持简单文本发送,是纯文本邮件才用得着。 HTML邮件怎么办??有附件的呢?
  • 已经用了 非常好用~
  • 要是带附件就好了
  • 还可以。能发送字符串,还不能支持附近的。
  • 这个是借助smtp发送的还算不错!
  • 非常好用!谢谢分享!!
  • 很有用呵呵
  • 很好,但好像不能发附件
  • 非常详细,有参考价值
  • 很有用,谢谢分享
  • 很好的例子 谢谢了
  • 很有帮助,实现了邮件发送功能