Przeglądaj źródła

Format mailer `From` field to include name

Updates the messafe `From` field to include the name and email of the
sender.
Jacob Bednarz 8 lat temu
rodzic
commit
66445faeb5
1 zmienionych plików z 1 dodań i 1 usunięć
  1. 1 1
      pkg/services/notifications/mailer.go

+ 1 - 1
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,