We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 3bc2d33 commit 588f4e8Copy full SHA for 588f4e8
1 file changed
email/email.go
@@ -26,8 +26,8 @@ type (
26
To string `json:"to"`
27
CC string `json:"cc"`
28
Subject string `json:"subject"`
29
- Text string `json:"text"`
30
- HTML string `json:"html"`
+ BodyText string `json:"body_text"`
+ BodyHTML string `json:"body_html"`
31
Inlines []*File `json:"inlines"`
32
Attachments []*File `json:"attachments"`
33
buffer *bytes.Buffer
@@ -105,10 +105,10 @@ func (e *Email) Send(m *Message) (err error) {
105
m.buffer.WriteString("\r\n")
106
107
// Message body
108
- if m.Text != "" {
109
- m.writeText(m.Text, "text/plain")
110
- } else if m.HTML != "" {
111
- m.writeText(m.HTML, "text/html")
+ if m.BodyText != "" {
+ m.writeText(m.BodyText, "text/plain")
+ } else if m.BodyHTML != "" {
+ m.writeText(m.BodyHTML, "text/html")
112
} else {
113
// TODO:
114
}
0 commit comments