BMAMail  1.0.0
E-Mail System
/home/bradarant/barant/BMAMail/SMTPService.h
Go to the documentation of this file.
1 #ifndef __SMTPService_h__
2 # define __SMTPService_h__
3 
4 # include <string>
5 # include "TCPServer.h"
6 # include "IPAddress.h"
7 # include "MailFileSystem.h"
8 # include "__SMTP_AUTH.h"
9 # include "__SMTP_DATA.h"
10 # include "__SMTP_EHLO.h"
11 # include "__SMTP_HELO.h"
12 # include "__SMTP_MAIL.h"
13 # include "__SMTP_NOOP.h"
14 # include "__SMTP_QUIT.h"
15 # include "__SMTP_RCPT.h"
16 # include "__SMTP_RSET.h"
17 # include "__SMTP_VRFY.h"
18 
19 namespace mail {
20 
21  class SMTPService : public core::TCPServer {
22 
23  public:
24  SMTPService(core::EPoll &epoll, std::string hostName, std::string mailPath, core::IPAddress ipAddress)
25  : TCPServer(epoll, ipAddress), mailFileSystem(mailPath), hostName(hostName) {
26  commands.add(_smtp_auth, "AUTH");
27  commands.add(_smtp_data, "DATA");
28  commands.add(_smtp_ehlo, "EHLO");
29  commands.add(_smtp_helo, "HELO");
30  commands.add(_smtp_mail, "MAIL");
31  commands.add(_smtp_noop, "NOOP");
32  commands.add(_smtp_quit, "QUIT");
33  commands.add(_smtp_rcpt, "RCPT");
34  commands.add(_smtp_rset, "RSET");
35  commands.add(_smtp_vrfy, "VRFY");
36  }
37 
39  std::string hostName;
40 
41  private:
42  __SMTP_AUTH _smtp_auth;
43  __SMTP_DATA _smtp_data;
44  __SMTP_EHLO _smtp_ehlo;
45  __SMTP_HELO _smtp_helo;
46  __SMTP_MAIL _smtp_mail;
47  __SMTP_NOOP _smtp_noop;
48  __SMTP_QUIT _smtp_quit;
49  __SMTP_RCPT _smtp_rcpt;
50  __SMTP_RSET _smtp_rset;
51  __SMTP_VRFY _smtp_vrfy;
52 
53  };
54 
55 }
56 
57 #endif
Definition: MailFileSystem.h:10
Definition: __SMTP_QUIT.h:8
Definition: __SMTP_AUTH.h:10
Definition: __SMTP_MAIL.h:9
Definition: __SMTP_RSET.h:8
std::string hostName
Definition: SMTPService.h:39
Definition: __IMAP_APPEND.h:7
Definition: __SMTP_HELO.h:9
Definition: __SMTP_EHLO.h:8
Definition: __SMTP_VRFY.h:9
Definition: SMTPService.h:21
SMTPService(core::EPoll &epoll, std::string hostName, std::string mailPath, core::IPAddress ipAddress)
Definition: SMTPService.h:24
Definition: __SMTP_DATA.h:8
MailFileSystem mailFileSystem
Definition: SMTPService.h:38
Definition: __SMTP_RCPT.h:10
Definition: __SMTP_NOOP.h:10