From c31bb912b8b143f2aca23f28e236b8e58311737e Mon Sep 17 00:00:00 2001 From: Hongcai Deng Date: Mon, 7 Sep 2015 13:17:20 +0800 Subject: [PATCH] add `FixedNotifyFrom` feature --- modules/mailer/mail.go | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/modules/mailer/mail.go b/modules/mailer/mail.go index 9a38b57d2..ef7f14393 100644 --- a/modules/mailer/mail.go +++ b/modules/mailer/mail.go @@ -31,7 +31,12 @@ const ( // Create New mail message use MailFrom and MailUser func NewMailMessageFrom(To []string, from, subject, body string) Message { - return NewHtmlMessage(To, from, subject, body) + if setting.MailService.FixedNotifyFrom { + return NewHtmlMessage(To, setting.MailService.From, subject, body) + } + else { + return NewHtmlMessage(To, from, subject, body) + } } // Create New mail message use MailFrom and MailUser