-
Notifications
You must be signed in to change notification settings - Fork 146
/
messages_types_v5.go
63 lines (56 loc) · 1.59 KB
/
messages_types_v5.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
57
58
59
60
61
62
63
package mailgun
// This file contains a draft for new v5 messages.
import (
"io"
"time"
)
// Message structures contain both the message text and the envelope for an e-mail message.
// TODO(v5): rename to CommonMessage
type commonMessageV5 struct {
domain string
to []string
tags []string
dkim *bool
deliveryTime time.Time
stoPeriod string
attachments []string
readerAttachments []ReaderAttachment
inlines []string
readerInlines []ReaderAttachment
bufferAttachments []BufferAttachment
nativeSend bool
testMode bool
tracking *bool
trackingClicks *string
trackingOpens *bool
headers map[string]string
variables map[string]string
templateVariables map[string]any
recipientVariables map[string]map[string]any
templateVersionTag string
templateRenderText bool
requireTLS bool
skipVerification bool
}
// PlainMessage contains fields relevant to plain API-synthesized messages.
// You're expected to use various setters to set most of these attributes,
// although from, subject, and text are set when the message is created with
// NewMessage.
// TODO(v5): rename to PlainMessage
type plainMessageV5 struct {
commonMessageV5
from string
cc []string
bcc []string
subject string
text string
html string
ampHtml string
template string
}
// MimeMessage contains fields relevant to pre-packaged MIME messages.
// TODO(v5): rename to MimeMessage
type mimeMessageV5 struct {
commonMessageV5
body io.ReadCloser
}