diff options
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()); } |