PDA

View Full Version : response from mail server



zakis
16th September 2009, 15:11
hello
How can I send something like "get" in a mail server (smtp & pop) to realize that server respond well;
that works well;

yogeshgokul
16th September 2009, 15:19
For SMTP you should send HELO after connection.
For ESMTP send EHLO.
You can use QTcpSocket or QNetworkAccessManager for that.
In Qt 4.6 there is better support for protocols like SMTP, IMAP.

zakis
22nd September 2009, 21:53
Hello
Can you explain how I can do with QNetworkAccessManager?
and the answer of the server will get it with a QNetworkReply?
Can you show me an example;
thanks

zakis
24th September 2009, 19:53
hi again:D
i check simple mail-client....http://qt.nokia.com/doc/3.0/mail-example.html

if i use QTcpSocket and send HELO to see if server response:

1) should send the helo from my smtp server?
2) how to display the result? for example in a textEdit?

thanks again...

yogeshgokul
25th September 2009, 06:32
1) should send the helo from my smtp server?

I think you creating a mail client (not a server) so from your client, you have to send HELO request to mail server.


how to display the result? for example in a textEdit?

Its in the example only you refereed. But if you are using QTCPSocket then read all data from socket in a QString and display it how ever you want.