BMAMail  1.0.0
E-Mail System
/home/bradarant/barant/BMAMail/__SMTP_MAIL.h
Go to the documentation of this file.
1 #ifndef ____SMTP_MAIL_h__
2 # define ____SMTP_MAIL_h__
3 
4 # include "SMTPCommand.h"
5 # include "SMTPSession.h"
6 
7 namespace mail {
8 
9  class __SMTP_MAIL : public SMTPCommand {
10 
11  int processCommand(coreutils::PString request, SMTPSession &session, std::stringstream &data) {
12 
13  session.sender = request[1].str();
14 
15  if(session.authState = USER_KNOWN) {
16  data << "250 OK" << CRLF;
17  session.recipientList.clear();
18  session.state = MAIL;
19 
20  } else if(verifyDomainMX(domainOnly(session.sender))) {
21  data << "250 OK" << CRLF;
22  session.recipientList.clear();
23  session.state = MAIL;
24  }
25 
26  }
27 
28  };
29 
30 }
31 
32 #endif
State state
Definition: SMTPSession.h:25
Definition: SMTPSession.h:11
AuthState authState
Definition: SMTPSession.h:26
Definition: __SMTP_MAIL.h:9
std::vector< std::string > recipientList
Definition: SMTPSession.h:30
Definition: __IMAP_APPEND.h:7
std::string sender
Definition: SMTPSession.h:29
Definition: SMTPCommand.h:9
#define CRLF
Definition: SMTPSession.h:7
Definition: SMTPSession.h:15
Definition: SMTPSession.h:12