forked from alash3al/smtp2http
-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.go
56 lines (46 loc) · 1.64 KB
/
message.go
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
49
50
51
52
53
54
55
56
package main
// EmailAddress ...
type EmailAddress struct {
Name string `json:"name,omitempty"`
Address string `json:"address,omitempty"`
}
// EmailAttachment ...
type EmailAttachment struct {
Filename string `json:"filename"`
ContentType string `json:"content_type"`
Data string `json:"data"`
}
// EmailEmbeddedFile ...
type EmailEmbeddedFile struct {
CID string `json:"cid"`
ContentType string `json:"content_type"`
Data string `json:"data"`
}
// EmailMessage ...
type EmailMessage struct {
References []string `json:"references,omitempty"`
SPFResult string `json:"spf,omitempty"`
ID string `json:"id,omitempty"`
Date string `json:"date,omitempty"`
Subject string `json:"subject,omitempty"`
ResentDate string `json:"resent_date,omitempty"`
ResentID string `json:"resent_id,omitempty"`
Body struct {
Text string `json:"text,omitempty"`
HTML string `json:"html,omitempty"`
} `json:"body"`
Addresses struct {
From *EmailAddress `json:"from"`
To *EmailAddress `json:"to"`
ReplyTo []*EmailAddress `json:"reply_to,omitempty"`
Cc []*EmailAddress `json:"cc,omitempty"`
Bcc []*EmailAddress `json:"bcc,omitempty"`
InReplyTo []string `json:"in_reply_to,omitempty"`
ResentFrom *EmailAddress `json:"resent_from,omitempty"`
ResentTo []*EmailAddress `json:"resent_to,omitempty"`
ResentCc []*EmailAddress `json:"resent_cc,omitempty"`
ResentBcc []*EmailAddress `json:"resent_bcc,omitempty"`
} `json:"addresses"`
Attachments []*EmailAttachment `json:"attachments,omitempty"`
EmbeddedFiles []*EmailEmbeddedFile `json:"embedded_files,omitempty"`
}