forked from gregington/SMTPClient
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMail.h
41 lines (33 loc) · 706 Bytes
/
Mail.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
32
33
34
35
36
37
38
39
40
41
#ifndef MAIL_LIB_H
#define MAIL_LIB_H
#include "Arduino.h"
#ifndef MAIL_LIB_MAX_RECIPIENTS
#define MAIL_LIB_MAX_RECIPIENTS 16
#endif
typedef enum {
TO = 1,
CC = 2,
BCC = 3
} recipient_t;
class Mail {
public:
Mail();
void from(char* from);
void replyTo(char* replyTo);
void to(char* to);
void cc(char* cc);
void bcc(char *bcc);
void subject(char *subject);
void body(char *body);
friend class SmtpClient;
private:
void addRecipient(recipient_t type, char* recipient);
char *_from;
char *_replyTo;
char *_recipients[MAIL_LIB_MAX_RECIPIENTS];
recipient_t _recipientTypes[MAIL_LIB_MAX_RECIPIENTS];
uint8_t _recipientCount;
char *_subject;
char *_body;
};
#endif