Browse Source

#2954 minor fix for when to set HTML alternative

tags/v1.2.0-rc1
Unknwon 9 years ago
parent
commit
dcef6a4c25
1 changed files with 3 additions and 5 deletions
  1. +3
    -5
      modules/mailer/mailer.go

+ 3
- 5
modules/mailer/mailer.go View File

@@ -38,13 +38,11 @@ func NewMessageFrom(to []string, from, subject, htmlBody string) *Message {
if err != nil {
log.Error(4, "html2text.FromString: %v", err)
msg.SetBody("text/html", htmlBody)
msg.AddAlternative("text/html", htmlBody)
} else {
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{


Loading…
Cancel
Save