From 66445faeb597dacd44337473aaa271ca7f39586f Mon Sep 17 00:00:00 2001 From: Jacob Bednarz Date: Wed, 15 Feb 2017 07:51:41 +1100 Subject: [PATCH] Format mailer `From` field to include name Updates the messafe `From` field to include the name and email of the sender. --- pkg/services/notifications/mailer.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkg/services/notifications/mailer.go b/pkg/services/notifications/mailer.go index 1ca4df8877a..ae1348cbf99 100644 --- a/pkg/services/notifications/mailer.go +++ b/pkg/services/notifications/mailer.go @@ -150,7 +150,7 @@ func buildEmailMessage(cmd *m.SendEmailCommand) (*Message, error) { return &Message{ To: cmd.To, - From: setting.Smtp.FromAddress, + From: fmt.Sprintf("%s <%s>", setting.Smtp.FromName, setting.Smtp.FromAddress), Subject: subject, Body: buffer.String(), EmbededFiles: cmd.EmbededFiles,