From eee80fc81e007baacbce80afe55e69a52bcfd1f6 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 20 Jun 2013 11:02:39 +0200 Subject: Added support for CHUNKING SMTP extension (RFC-3030). More robust unit tests for SMTP. --- src/net/smtp/SMTPCommand.cpp | 14 ++++++++++++++ 1 file changed, 14 insertions(+) (limited to 'src/net/smtp/SMTPCommand.cpp') diff --git a/src/net/smtp/SMTPCommand.cpp b/src/net/smtp/SMTPCommand.cpp index d9f5c286..9813c4f5 100644 --- a/src/net/smtp/SMTPCommand.cpp +++ b/src/net/smtp/SMTPCommand.cpp @@ -149,6 +149,20 @@ ref SMTPCommand::DATA() } +// static +ref SMTPCommand::BDAT(const unsigned long chunkSize, const bool last) +{ + std::ostringstream cmd; + cmd.imbue(std::locale::classic()); + cmd << "BDAT " << chunkSize; + + if (last) + cmd << " LAST"; + + return createCommand(cmd.str()); +} + + // static ref SMTPCommand::NOOP() { -- cgit v1.2.3