-
Notifications
You must be signed in to change notification settings - Fork 13
/
Copy pathSMTPClientService.h
31 lines (24 loc) · 1.17 KB
/
SMTPClientService.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#pragma once
#include "ClientService.h"
#include "functions/FCast.h"
#include "functions/FCrypt.h"
#include "functions/FString.h"
#include "Global.h"
#define SMTP_CLIENT_SERVICE_DEFAULT_PORT 25
#define SMTP_CLIENT_SERVICE_SSL_DEFAULT_PORT 465
#define SMTP_CLIENT_SERVICE_TLS_DEFAULT_PORT 587
#define SMTP_CLIENT_SERVICE_AUTH_COMMAND "AUTH LOGIN"
#define SMTP_CLIENT_SERVICE_AUTH_COMMAND_USER "<login-username>"
#define SMTP_CLIENT_SERVICE_AUTH_COMMAND_PASSWORD "<login-password>"
#define SMTP_CLIENT_SERVICE_AUTH_ASK_CREDENTIALS_REPLY_CODE "334"
#define SMTP_CLIENT_SERVICE_AUTH_SUCCESS_REPLY_CODE "235"
#define SMTP_CLIENT_SERVICE_END_COMMAND_LINE "\r\n"
using namespace std;
class SMTPClientService: public ClientService {
private:
bool authCryptographicSecurity();
bool authLoginUser();
public:
SMTPClientService(unsigned int nRecvSecTimeout = CLIENT_SERVICE_RECV_DEFAULT_SECONDS_TIMEOUT);
~SMTPClientService();
};