From 93c8d3a0717de4b82e765f6df349e48819be0770 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Wed, 12 Jun 2013 21:19:36 +0200 Subject: Added support for SMTPUTF8 extension (RFC-6531). --- src/net/smtp/SMTPTransport.cpp | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'src/net/smtp/SMTPTransport.cpp') diff --git a/src/net/smtp/SMTPTransport.cpp b/src/net/smtp/SMTPTransport.cpp index 30da3eff..cc3fc6ef 100644 --- a/src/net/smtp/SMTPTransport.cpp +++ b/src/net/smtp/SMTPTransport.cpp @@ -587,10 +587,13 @@ void SMTPTransport::send commands->addCommand(SMTPCommand::RSET()); // Emit the "MAIL" command + const bool hasSMTPUTF8 = + m_extensions.find("SMTPUTF8") != m_extensions.end(); + if (!sender.isEmpty()) - commands->addCommand(SMTPCommand::MAIL(sender)); + commands->addCommand(SMTPCommand::MAIL(sender, hasSMTPUTF8)); else - commands->addCommand(SMTPCommand::MAIL(expeditor)); + commands->addCommand(SMTPCommand::MAIL(expeditor, hasSMTPUTF8)); // Now, we will need to reset next time m_needReset = true; @@ -599,7 +602,7 @@ void SMTPTransport::send for (size_t i = 0 ; i < recipients.getMailboxCount() ; ++i) { const mailbox& mbox = *recipients.getMailboxAt(i); - commands->addCommand(SMTPCommand::RCPT(mbox)); + commands->addCommand(SMTPCommand::RCPT(mbox, hasSMTPUTF8)); } // Prepare sending of message data -- cgit v1.2.3