aboutsummaryrefslogtreecommitdiffstats
path: root/src/net/smtp/SMTPTransport.cpp
diff options
context:
space:
mode:
authorVincent Richard <[email protected]>2013-06-12 19:19:36 +0000
committerVincent Richard <[email protected]>2013-06-12 19:19:36 +0000
commit93c8d3a0717de4b82e765f6df349e48819be0770 (patch)
tree32c643c35b3e45d340d30d06e92c476d41039644 /src/net/smtp/SMTPTransport.cpp
parentHomogeneous use of vmime::string. (diff)
downloadvmime-93c8d3a0717de4b82e765f6df349e48819be0770.tar.gz
vmime-93c8d3a0717de4b82e765f6df349e48819be0770.zip
Added support for SMTPUTF8 extension (RFC-6531).
Diffstat (limited to 'src/net/smtp/SMTPTransport.cpp')
-rw-r--r--src/net/smtp/SMTPTransport.cpp9
1 files changed, 6 insertions, 3 deletions
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