如何通过SMTP发送邮件并使用Qt获取邮件?
问题描述:
由于我不了解,我应该使用QTcpSocket类来发送邮件,并使用QTcpServer类来侦听连接并获取邮件。但是,由于我是这方面的初学者,因此我需要一个示例来演示一个简单的事务。请举个例子。
As I unserstand I should use QTcpSocket class in order to send a mail, and QTcpServer class in order to listen the connection and get the mail. But as I am a begginer in this area I need an example that demonstrates a simple transaction. Please give an example.
答
这是适用于C ++和Qt的有效电子邮件发送示例,并且效果很好。我想您可以看一下这个例子以了解更多信息。 (这是LGPL)顺便感谢bluetiger9的这段代码。
This is a working e-mail sending example for C++ and Qt and it works very well. I think you can take a look at this example to learn more. (It is LGPL) Thanks bluetiger9 for this code by the way.