tags:

views:

104

answers:

1

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.

A: 

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.

stefaanv
I agree that I need to know about the protocols. But I am intrerrested about Qt features and classes regarding to the task.
Narek
@Narek: is this educational or to have a complete system that can be controllable by email? In the former case, there are examples like here: http://www.qtcentre.org/threads/2221-Sending-email-using-Qt, in the latter, really look for a library or else you will have to fix things because they don't work as users expect
stefaanv
It is kind of educational. BTW I have seen the link you noted above, but user called nielsenj wrote in his/her example how to send, and I dont know how to get the email. If someone can tell me how to get an email that is being sent in the example of your link, that would be great!!!
Narek
@Narek: In that example, receiving is done by ReadyRead() which is signalled from QTcpSocket(), so just instantiating Smtp, should have a server waiting for a mail and parsing it in ReadyRead()
stefaanv
I guess ReadyRead() should not do the receiving as SMTP only for sending mail, but for recieving you should use for example POP3.
Narek