BARANTMail/__SMTP_MAIL.h
2019-09-13 10:34:10 -07:00

39 lines
1.2 KiB
C++

#ifndef ____SMTP_MAIL_h__
#define ____SMTP_MAIL_h__
#include "Command.h"
namespace mail {
class __SMTP_MAIL : public core::Command {
int processCommand(std::string request, Session *session, std::stringstream &data);
data << "" << std::endl;
//---------------------------------------------------------------------------
// MAIL command request handling.
//---------------------------------------------------------------------------
else if(command(input) == "MAIL") {
sender = cleanEMail(input.substr(5));
//-------------------------------------------------------------
// Verify that the senders domain name resolves to an address
// with an MX record. If not and there is a bounce then we
// will not be able to return the bounce message so it is
// probably a spammer anyway.
//-------------------------------------------------------------
if(verifyDomainMX(domainOnly(sender))) {
cout << "250 OK" << CRLF;
log.message("Response: 250 OK.");
recipientList = "";
state = "MAIL";
}
}