Format mailer From field to include name

Updates the messafe `From` field to include the name and email of the
sender.
This commit is contained in:
Jacob Bednarz 2017-02-15 07:51:41 +11:00
parent 90cbfacacf
commit 66445faeb5
No known key found for this signature in database
GPG Key ID: 5BDAF4B30FB432FB

View File

@ -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,