-
Notifications
You must be signed in to change notification settings - Fork 0
/
message.go
46 lines (35 loc) · 1.18 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
package postmark
// Message will contain the basic information for an email message
type Message struct {
From string `json:",omitempty"`
To string `json:",omitempty"`
Cc string `json:",omitempty"`
Bcc string `json:",omitempty"`
Subject string `json:",omitempty"`
Tag string `json:",omitempty"`
HTMLBody string `json:"HtmlBody,omitempty"`
TextBody string `json:"TextBody,omitempty"`
ReplyTo string `json:",omitempty"`
TrackOpens bool `json:",omitempty"`
TrackLinks string `json:",omitempty"`
Headers []MailHeader `json:",omitempty"`
Attachments []Attachment `json:",omitempty"`
}
// MessageWithTemplate can be used to send a message using a specific
// postmark template
type MessageWithTemplate struct {
Message
TemplateID int `json:"TemplateId,omitempty"`
TemplateAlias string `json:",omitempty"`
TemplateModel map[string]interface{}
}
// Tracking of links in messages
const TrackNone string = "None"
const TrackHTMLAndText string = "HtmlAndText"
const TrackHtmlOnly string = "HtmlOnly"
const TrackTextOnly string = "TextOnly"
// MailHeader can be used to set specific mail headers
type MailHeader struct {
Name string `json:",omitempty"`
Value string
}