diff options
author | Vincent Richard <[email protected]> | 2013-06-20 09:02:39 +0000 |
---|---|---|
committer | Vincent Richard <[email protected]> | 2013-06-20 09:02:39 +0000 |
commit | eee80fc81e007baacbce80afe55e69a52bcfd1f6 (patch) | |
tree | 4ed1aeecac70ef7ab614f2956e306bbc427fe837 /src/net/smtp/SMTPCommand.cpp | |
parent | Moved SMTP connection-related things to SMTPConnection object. (diff) | |
download | vmime-eee80fc81e007baacbce80afe55e69a52bcfd1f6.tar.gz vmime-eee80fc81e007baacbce80afe55e69a52bcfd1f6.zip |
Added support for CHUNKING SMTP extension (RFC-3030). More robust unit tests for SMTP.
Diffstat (limited to 'src/net/smtp/SMTPCommand.cpp')
-rw-r--r-- | src/net/smtp/SMTPCommand.cpp | 14 |
1 files changed, 14 insertions, 0 deletions
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 @@ -150,6 +150,20 @@ ref <SMTPCommand> SMTPCommand::DATA() // static +ref <SMTPCommand> 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> SMTPCommand::NOOP() { return createCommand("NOOP"); |