Return after sending message when sending is supported.

This commit is contained in:
Vincent Richard 2013-06-22 10:42:36 +02:00
parent eee80fc81e
commit 87f6acb0b5
2 changed files with 4 additions and 0 deletions

View File

@ -308,6 +308,7 @@ void SMTPTransport::send
utility::inputStreamStringAdapter isAdapter(str); utility::inputStreamStringAdapter isAdapter(str);
send(expeditor, recipients, isAdapter, str.length(), progress, sender); send(expeditor, recipients, isAdapter, str.length(), progress, sender);
return;
} }
// Send message envelope // Send message envelope

View File

@ -211,6 +211,7 @@ public:
else if (cmd == "MAIL") else if (cmd == "MAIL")
{ {
VASSERT("Client must send the HELO command", m_heloSent); VASSERT("Client must send the HELO command", m_heloSent);
VASSERT("The MAIL command must be sent only one time", !m_mailSent);
VASSERT_EQ("MAIL", std::string("MAIL FROM:<expeditor@test.vmime.org>"), line); VASSERT_EQ("MAIL", std::string("MAIL FROM:<expeditor@test.vmime.org>"), line);
@ -399,6 +400,8 @@ public:
} }
else if (cmd == "MAIL") else if (cmd == "MAIL")
{ {
VASSERT("The MAIL command must be sent only one time", !m_mailSent);
localSend("250 OK\r\n"); localSend("250 OK\r\n");
m_mailSent = true; m_mailSent = true;