[PR #2559] [MERGED] Fix sending mail with a non-latin display name. #2102 #16467

Closed
opened 2025-11-02 12:11:19 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/2559
Author: @rems4e
Created: 9/20/2017
Status: Merged
Merged: 9/21/2017
Merged by: @lunny

Base: masterHead: master


📝 Commits (4)

  • 56f9555 Fix sending mail with a non-latin display name. #2102
  • d35beee Take into account the possibility that setting.MailService.From is in name <email@address> format. Bug (#2102)
  • e5a8745 Merge branch 'master' into master
  • 4774207 Merge branch 'master' into master

📊 Changes

3 files changed (+6 additions, -4 deletions)

View changed files

📝 models/mail.go (+1 -1)
📝 modules/mailer/mailer.go (+3 -3)
📝 modules/setting/setting.go (+2 -0)

📄 Description

Signed-off-by: Rémi Saurel contact@remi-saurel.com

This pull request fixes #2102, where display name of email addresses containing non-latin characters cannot be used in the From: field when creating/updating issues (resulting in no email sent at all).

The fix is simple, it uses Message.SetAddressHeader, instead of Message.SetHeader with a custom-formatted DisplayName <email@address> from address.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/2559 **Author:** [@rems4e](https://github.com/rems4e) **Created:** 9/20/2017 **Status:** ✅ Merged **Merged:** 9/21/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `master` --- ### 📝 Commits (4) - [`56f9555`](https://github.com/go-gitea/gitea/commit/56f9555cbb914a9b281a08f5fb8c5301aade441b) Fix sending mail with a non-latin display name. #2102 - [`d35beee`](https://github.com/go-gitea/gitea/commit/d35beeee0afd37aa1b515d4bfc07bb65445ccb8c) Take into account the possibility that setting.MailService.From is in `name <email@address>` format. #2102 - [`e5a8745`](https://github.com/go-gitea/gitea/commit/e5a8745a7941030cc5d40cae0474bf8241b42f86) Merge branch 'master' into master - [`4774207`](https://github.com/go-gitea/gitea/commit/477420798e5bc15b0ccf3eb0a4052beb57ea3fcf) Merge branch 'master' into master ### 📊 Changes **3 files changed** (+6 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `models/mail.go` (+1 -1) 📝 `modules/mailer/mailer.go` (+3 -3) 📝 `modules/setting/setting.go` (+2 -0) </details> ### 📄 Description Signed-off-by: Rémi Saurel <contact@remi-saurel.com> This pull request fixes #2102, where display name of email addresses containing non-latin characters cannot be used in the From: field when creating/updating issues (resulting in no email sent at all). The fix is simple, it uses `Message.SetAddressHeader`, instead of `Message.SetHeader` with a custom-formatted `DisplayName <email@address>` from address. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 12:11:19 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#16467