How to send mail via SMTP and get it by using Qt?

大憨熊 提交于 2020-06-22 09:59:58

问题


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.


回答1:


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.




回答2:


if you are serious of making yet another smtp implementation starting from Qt, I would suggest at least reading the smtp-rfc. To be productive, I would look for an smtp library like this (randomly chosen, I haven't used it yet).

A simple example from a q&a site can only help you upto your next problem.




回答3:


This worked for me: Simple Smtp for Qt5.



来源:https://stackoverflow.com/questions/3717018/how-to-send-mail-via-smtp-and-get-it-by-using-qt

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!