More development.

This commit is contained in:
barant committed 2019-09-13 10:34:10 -07:00
1 parent caa8dd7d90
commit 50eb707f10
22 files changed
+302 -244

No files matched your search

+14 -17
View File
@@ -1,22 +1,14 @@
#ifndef ____SMTP_AUTH_h__
#define ____SMTP_AUTH_h__
#ifndef ____SMTP_RCPT_h__
#define ____SMTP_RCPT_h__
#include "Command.h"
namespace http {
namespace mail {
class __SMTP_AUTH : public core::Command {
class __SMTP_RCPT : public core::Command {
int processCommand(std::string request, Session *session, std::stringstream &data);
data << "" << std::endl;
//---------------------------------------------------------------------------
// RCPT command request handling.
//---------------------------------------------------------------------------
else if(command(input) == "RCPT") {
if((state == "MAIL") || (state == "RCPT")) {
bool done = false;
@@ -41,8 +33,7 @@ namespace http {
//-----------------------------------------------
recipientList += aliasRecipients;
cout << "250 OK" << CRLF;
log.message("Response: 250 OK.");
data << "250 OK" << CRLF;
state = "RCPT";
done = true;
}
@@ -65,8 +56,7 @@ namespace http {
//------------------------------------------
recipientList += cleanEMail(recipient) + " ";
cout << "250 OK" << CRLF;
log.message("Response: 250 OK.");
data << "250 OK" << CRLF;
state = "RCPT";
done = true;
}
@@ -162,4 +152,11 @@ namespace http {
cout << "503 Please use MAIL first" << CRLF;
log.message("Response: 503 Please use MAIL first.");
}
}
return 0;
}
};
}
#endif