mirror of
https://codeberg.org/forgejo/forgejo
synced 2024-11-30 22:06:11 +01:00
#2954 minor fix for when to set HTML alternative
This commit is contained in:
parent
3d105733a9
commit
0240f520ab
|
@ -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…
Reference in a new issue