-
Notifications
You must be signed in to change notification settings - Fork 1
/
email.proto
48 lines (40 loc) · 1.08 KB
/
email.proto
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
42
43
44
45
46
47
48
syntax = "proto3";
option go_package= "/src";
message Attachment {
string base64Data = 1;
string filename = 2;
}
message ResponseMessage {
bool success = 1;
string ack = 2;
}
message Recipients {
repeated string to = 1;
repeated string cc = 2;
repeated string bcc = 3;
}
message SendEmailRequest {
Recipients recipients = 1;
string subject = 2;
string body = 3;
string contentType = 4;
repeated Attachment attachments = 5;
map<string, string> headers = 6;
}
message RawSendEmailRequest {
repeated string recipients = 1;
bytes body = 2;
}
message SendEmailWithTemplateRequest {
Recipients recipients = 1;
string subject = 2;
string template_name = 3;
repeated Attachment attachments = 4;
map<string, string> template_params = 5;
map<string, string> headers = 6;
}
service EmailService {
rpc SendEmail(SendEmailRequest) returns(ResponseMessage) {}
rpc SendRawEmail(RawSendEmailRequest) returns(ResponseMessage) {}
rpc SendEmailWithTemplate(SendEmailWithTemplateRequest) returns(ResponseMessage) {}
}