#include "__SMTP_RSET.h" #include "SMTPCommand.h" #include "SMTPSyntax.h" namespace mail { int __SMTP_RSET::processCommand(coreutils::ZString &request, SMTPSession &session, SMTPServer &server) { // RFC 5321 4.1.1.5: "RSET" CRLF - no parameters. if (!SMTPSyntax::argument(line(request)).empty()) { session.out << "501 5.5.4 Syntax: RSET (no parameters)" << CRLF; return 1; } // Clears the transaction (sender, recipients, data) but keeps the // EHLO/HELO and any authentication. session.resetTransaction(); session.out << "250 2.0.0 OK" << CRLF; return 1; } }