PDA

View Full Version : qxtsmtp connect->disconnect



bloodfont
11th June 2013, 13:48
Hi, I am having a problem using qxtsmtp. I am able to send emails by connecting to gmail’s smtp server but I cannot do so using a payed for server. It just connects and disconnects immediately afterwords. I connected all the slots to functions to display error messages but nothing. I have tried with all qxtsmtp’s slots, QTcpSocket’s slots, QAbstractSocket’s slots but nothing. I have browsed the source code of qxtsmtp.cpp and it seems to me that the only moment in which only the disconnect signal is emitted is when sending EHLO/HELO:


//code snippet from qxtsmtp.cpp
if (code != “250”)
{
// error!
if (state != HeloSent)
{
// maybe let’s try HELO
socket->write(“helo\r\n”);
state = HeloSent;
}
else
{
// nope
socket->write(“QUIT\r\n”);
socket->flush();
socket->disconnectFromHost();
}
return;
}

So it tries to send HELO, it doesn’t work and so it disconnects. I’m thinking that the server has a problem with how these messages are sent. Any thoughts would be greatly appreciated.
Thanks in advance.