如何通过SMTP发送邮件并使用Qt获取邮件? [英] How to send mail via SMTP and get it by using Qt?
本文介绍了如何通过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.
这篇关于如何通过SMTP发送邮件并使用Qt获取邮件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文