Browse Source

#2954 minor fix for when to set HTML alternative

pull/3137/head
Unknwon 9 years ago
parent
commit
0240f520ab
  1. 8
      modules/mailer/mailer.go

8
modules/mailer/mailer.go

@ -38,13 +38,11 @@ func NewMessageFrom(to []string, from, subject, htmlBody string) *Message {
if err != nil { if err != nil {
log.Error(4, "html2text.FromString: %v", err) log.Error(4, "html2text.FromString: %v", err)
msg.SetBody("text/html", htmlBody) msg.SetBody("text/html", htmlBody)
msg.AddAlternative("text/html", htmlBody)
} else { } else {
msg.SetBody("text/plain", body) msg.SetBody("text/plain", body)
} if setting.MailService.EnableHTMLAlternative {
msg.AddAlternative("text/html", htmlBody)
if setting.MailService.EnableHTMLAlternative { }
msg.AddAlternative("text/html", htmlBody)
} }
return &Message{ return &Message{

Loading…
Cancel
Save