aboutsummaryrefslogtreecommitdiffstats
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/mailer/mailer.go8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go
index 6a979969e4..13d80b5648 100644
--- a/modules/mailer/mailer.go
+++ b/modules/mailer/mailer.go
@@ -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{