Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

c++

email

smtp

qt

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.

like image 439
Narek Avatar asked Sep 15 '10 11:09

Narek


People also ask

How do I send an email using Qt?

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.


1 Answers

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.

like image 90
stefaanv Avatar answered Nov 15 '22 20:11

stefaanv