diff options
author | Vincent Richard <[email protected]> | 2013-06-24 13:32:40 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-06-24 13:32:40 +0000 |
commit | 895b07cae9741f44a1272b2f3875f8dd94763222 (patch) | |
tree | 6532de59e01676c78b423b5de5ebc1411c7da111 /src/net/smtp/SMTPCommand.cpp | |
parent | Return after sending message when sending is supported. (diff) | |
download | vmime-895b07cae9741f44a1272b2f3875f8dd94763222.tar.gz vmime-895b07cae9741f44a1272b2f3875f8dd94763222.zip |
Added support for SIZE SMTP extension (RFC-1870).
Diffstat (limited to 'src/net/smtp/SMTPCommand.cpp')
-rw-r--r-- | src/net/smtp/SMTPCommand.cpp | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/net/smtp/SMTPCommand.cpp b/src/net/smtp/SMTPCommand.cpp index 9813c4f5..e40797f2 100644 --- a/src/net/smtp/SMTPCommand.cpp +++ b/src/net/smtp/SMTPCommand.cpp @@ -89,6 +89,13 @@ ref <SMTPCommand> SMTPCommand::STARTTLS() // static ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8) { + return MAIL(mbox, utf8, 0); +} + + +// static +ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8, const unsigned long size) +{ std::ostringstream cmd; cmd.imbue(std::locale::classic()); cmd << "MAIL FROM:<"; @@ -108,6 +115,9 @@ ref <SMTPCommand> SMTPCommand::MAIL(const mailbox& mbox, const bool utf8) if (utf8) cmd << " SMTPUTF8"; + if (size != 0) + cmd << " SIZE=" << size; + return createCommand(cmd.str()); } |