Merge pull request #52 from kosmaz/v1.1
Caught SmtpClient::SendMessageTimeoutException
This commit is contained in:
commit
800ff9cf69
@ -420,7 +420,16 @@ bool SmtpClient::sendMail(MimeMessage& email)
|
|||||||
|
|
||||||
void SmtpClient::quit()
|
void SmtpClient::quit()
|
||||||
{
|
{
|
||||||
|
try
|
||||||
|
{
|
||||||
sendMessage("QUIT");
|
sendMessage("QUIT");
|
||||||
|
}
|
||||||
|
catch(SmtpClient::SendMessageTimeoutException)
|
||||||
|
{
|
||||||
|
//Manually close the connection to the smtp server if message "QUIT" wasn't received by the smtp server
|
||||||
|
if(socket->state() == QAbstractSocket::ConnectedState || socket->state() == QAbstractSocket::ConnectingState || socket->state() == QAbstractSocket::HostLookupState)
|
||||||
|
socket->disconnectFromHost();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* [3] --- */
|
/* [3] --- */
|
||||||
|
Loading…
Reference in New Issue
Block a user