From 20ba86512f9a8c81f5e323c1d321ca049d48a47d Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 8 Dec 2010 08:52:54 +0000 Subject: [PATCH] No extra space between ':' and '<' in MAIL FROM and RCPT TO. Wait for server response after QUIT and before closing connection. --- src/net/smtp/SMTPTransport.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp index 204daae6..d9fb7b86 100644 --- a/src/net/smtp/SMTPTransport.cpp +++ b/src/net/smtp/SMTPTransport.cpp @@ -516,6 +516,7 @@ void SMTPTransport::internalDisconnect() try { sendRequest("QUIT"); + readResponse(); } catch (exception&) { @@ -565,7 +566,7 @@ void SMTPTransport::send(const mailbox& expeditor, const mailboxList& recipients // Emit the "MAIL" command ref resp; - sendRequest("MAIL FROM: <" + expeditor.getEmail() + ">"); + sendRequest("MAIL FROM:<" + expeditor.getEmail() + ">"); if ((resp = readResponse())->getCode() != 250) { @@ -578,7 +579,7 @@ void SMTPTransport::send(const mailbox& expeditor, const mailboxList& recipients { const mailbox& mbox = *recipients.getMailboxAt(i); - sendRequest("RCPT TO: <" + mbox.getEmail() + ">"); + sendRequest("RCPT TO:<" + mbox.getEmail() + ">"); if ((resp = readResponse())->getCode() != 250) {