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 thi
This worked for me: Simple Smtp for Qt5.
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.
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.