-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathmail.go
35 lines (29 loc) · 780 Bytes
/
mail.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
package azmail
type Mail struct {
Recipients MailRecipients
Content MailContent
Attachments []MailAttachment
}
type MailRecipients struct {
To []MailAddress `json:"to"`
Cc []MailAddress `json:"cc"`
Bcc []MailAddress `json:"bcc"`
}
type MailAddress struct {
Address string `json:"address"`
DisplayName string `json:"displayName"`
}
type MailContent struct {
Subject string `json:"subject"`
PlainText string `json:"plainText"`
Html string `json:"html"`
}
type MailAttachment struct {
Name string `json:"name"`
Base64Content string `json:"contentInBase64"`
ContentType string `json:"contentType"`
}
// NewMail is a convenience function for creating a new Mail and returning the pointer to it.
func NewMail() *Mail {
return &Mail{}
}