Issue #41 - remove extra space from MAIL FROM and RCPT TO commands

This commit is contained in:
Attila Tőkés 2017-06-01 18:20:49 +03:00
parent cb04e35bed
commit 6b676827fe

View File

@ -364,8 +364,8 @@ bool SmtpClient::sendMail(MimeMessage& email)
// To (primary recipients) // To (primary recipients)
for (it = email.getRecipients().begin(), itEnd = email.getRecipients().end(); for (it = email.getRecipients().begin(), itEnd = email.getRecipients().end();
it != itEnd; ++it) it != itEnd; ++it)
{
sendMessage("RCPT TO: <" + (*it)->getAddress() + ">"); sendMessage("RCPT TO:<" + (*it)->getAddress() + ">");
waitForResponse(); waitForResponse();
if (responseCode != 250) return false; if (responseCode != 250) return false;
@ -375,7 +375,7 @@ bool SmtpClient::sendMail(MimeMessage& email)
for (it = email.getRecipients(MimeMessage::Cc).begin(), itEnd = email.getRecipients(MimeMessage::Cc).end(); for (it = email.getRecipients(MimeMessage::Cc).begin(), itEnd = email.getRecipients(MimeMessage::Cc).end();
it != itEnd; ++it) it != itEnd; ++it)
{ {
sendMessage("RCPT TO: <" + (*it)->getAddress() + ">"); sendMessage("RCPT TO:<" + (*it)->getAddress() + ">");
waitForResponse(); waitForResponse();
if (responseCode != 250) return false; if (responseCode != 250) return false;