Skip to content

Commit 588f4e8

Browse files
committed
[Email] Text to BodyText & HTML to BodyHTML
Signed-off-by: Vishal Rana <[email protected]>
1 parent 3bc2d33 commit 588f4e8

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

email/email.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,8 @@ type (
2626
To string `json:"to"`
2727
CC string `json:"cc"`
2828
Subject string `json:"subject"`
29-
Text string `json:"text"`
30-
HTML string `json:"html"`
29+
BodyText string `json:"body_text"`
30+
BodyHTML string `json:"body_html"`
3131
Inlines []*File `json:"inlines"`
3232
Attachments []*File `json:"attachments"`
3333
buffer *bytes.Buffer
@@ -105,10 +105,10 @@ func (e *Email) Send(m *Message) (err error) {
105105
m.buffer.WriteString("\r\n")
106106

107107
// 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")
108+
if m.BodyText != "" {
109+
m.writeText(m.BodyText, "text/plain")
110+
} else if m.BodyHTML != "" {
111+
m.writeText(m.BodyHTML, "text/html")
112112
} else {
113113
// TODO:
114114
}

0 commit comments

Comments
 (0)