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.
For that all you need is SMTP client code in your app, and knowledge of which SMTP server you wish it to connect to send the email, e.g smtp.gmail.com if you have a Gmail account. POP3/IMAP are for retrieving emails from a server. You have never asked for that. Unless you now need that facility too, forget about them.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With