Procházet zdrojové kódy

Format mailer `From` field to include name

Updates the messafe `From` field to include the name and email of the
sender.
Jacob Bednarz před 8 roky
rodič
revize
66445faeb5
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  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,