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;
}
//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;
}
To copy to clipboard, switch view to plain text mode
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.
Bookmarks