1
1
mirror of https://github.com/go-gitea/gitea synced 2025-07-23 02:38:35 +00:00

Add option to change mail from user display name (#31528)

Make it posible to let mails show e.g.:

`Max Musternam (via gitea.kithara.com) <gitea@kithara.com>`

Docs: https://gitea.com/gitea/docs/pulls/23

---
*Sponsored by Kithara Software GmbH*
This commit is contained in:
6543
2024-07-14 14:27:00 -07:00
committed by GitHub
parent 0d08bb6112
commit 0f53324182
6 changed files with 86 additions and 3 deletions

View File

@@ -79,7 +79,7 @@ func sendRepoTransferNotifyMailPerLang(lang string, newOwner, doer *user_model.U
}
for _, to := range emailTos {
msg := NewMessage(to.EmailTo(), subject, content.String())
msg := NewMessageFrom(to.EmailTo(), fromDisplayName(doer), setting.MailService.FromEmail, subject, content.String())
msg.Info = fmt.Sprintf("UID: %d, repository pending transfer notification", newOwner.ID)
SendAsync(msg)