-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Accented letters are not accepted in mailer.FROM #2188
Comments
This is a gomail problem, but there is a workaround, but this problem occurs too when user name contains any non ASCII character. type mimeEncoder struct {
mime.WordEncoder
}
bEncoding := mimeEncoder{mime.BEncoding}
name := bEncoding.Encode("utf-8", "József Galamb")
msg := NewMessageFrom([]string{name + " <jon@example.org>"}, "jon@example.org", "subject", "body") If this solution is okay then i could create a PR:
|
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs during the next 2 weeks. Thank you for your contributions. |
This issue has been automatically closed because of inactivity. You can re-open it if needed. |
This was fixed by #2559 |
[x]
):Description
I tried to activate gitea's mailer by putting the following in custom/conf/app.ini:
When I clicked on the "Send Test Email" button, I got the error message:
Impossible d'envoyer un e-mail de test à 'bonet@grenoble.cnrs.fr': gomail: could not send email 1: gomail: invalid address "=?UTF-8?q?N=C3=A9el_Institut_git_hosting_service_?=": mail: unclosed angle-addr
.I then replaced "Néel" by "Neel" and everything worked fine, thus I assume this is a problem with gitea (or gomail) mishandling the accented letter "é" (= U+00E9, Latin small letter e with acute).
It should be noted that "
=?UTF-8?q?N=C3=A9el_Institut_git_hosting_service_?=
" is the proper way to encode "Néel Institut git hosting service
" in an e-mail header, as per RFC 2047. Thus, it looks like gomail genuinely attempts to support non-ASCII characters in the e-mail From field.The text was updated successfully, but these errors were encountered: