Skip to content

Commit

Permalink
Fixing body message attachment order. Plain text was being shown befo…
Browse files Browse the repository at this point in the history
…re HTML text.
  • Loading branch information
raguay committed Nov 1, 2022
1 parent 7a6633c commit 906f6e9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,8 +331,8 @@ func (b *App) SendEmail(username string, from string, password string, host stri
m.SetHeader("From", from)
m.SetHeader("To", toList)
m.SetHeader("Subject", subject)
m.SetBody("text/html", msg)
m.AddAlternative("text/plain", msgText)
m.SetBody("text/plain", msgText)
m.AddAlternative("text/html", msg)
iport, _ := strconv.Atoi(port)
d := mail.NewDialer(host, iport, username, password)
d.TLSConfig = &tls.Config{InsecureSkipVerify: true}
Expand Down
1 change: 1 addition & 0 deletions frontend/src/components/EmailIt.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@
if (validate(toAddress)) {
addToEmails(toAddress);
var bodyText = bodyValue + cleanTags($account.signiture);
bodyText = $runtemplate('given',bodyText);
showPreview = false;
emailState = "edit";
Expand Down

0 comments on commit 906f6e9

Please sign in to comment.