-
Notifications
You must be signed in to change notification settings - Fork 5k
Fix sender of issue notifications #3616
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
Conversation
@@ -160,7 +160,7 @@ func composeIssueMessage(issue *Issue, doer *User, tplName base.TplName, tos []s | |||
if err != nil { | |||
log.Error(3, "HTMLString (%s): %v", tplName, err) | |||
} | |||
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.User), subject, content) | |||
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.From), subject, content) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is not going to work, because this setting can contain name <email>
, not just email address.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With 6e0a1a9 it would not be
a problem for the FROM
to be name <email>
.
BTW, according to the Config Cheat Sheet
, USER
could also not
be an email (it says "usually your e-mail address").
@@ -160,7 +161,12 @@ func composeIssueMessage(issue *Issue, doer *User, tplName base.TplName, tos []s | |||
if err != nil { | |||
log.Error(3, "HTMLString (%s): %v", tplName, err) | |||
} | |||
msg := mailer.NewMessageFrom(tos, fmt.Sprintf(`"%s" <%s>`, doer.DisplayName(), setting.MailService.User), subject, content) | |||
sender, err := mail.ParseAddress(setting.MailService.From) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should put this process in the modules/setting
while loading email configs? Add a FromEmail
field in the struct https://github.com/gogits/gogs/blob/master/modules/setting/setting.go#L716 . So we can print error and halt at start time.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use proper url for libravatar dep
f66c565
to
fb4a8e6
Compare
It is the FROM field in mailer configuration that needs be used, not the USER field, which is for authentication. Closes gogs#3615
fb4a8e6
to
20c1740
Compare
Sorry but I'm afraid the branch attached to this PR cannot be merged into Gogs anymore as it was rebased to Gitea develop branch. Closing. |
…3616) * Use Segoe UI for Latin characters before falling back to YaHei This fixes issues with character rendering on hidpi displays and other aliasing/hinting issues, as Segoe UI has been painstakingly hinted by typographers for Microsoft while YaHei has not. See gogs#3237 for more details. Closes gogs#3237 * Include transformed LESS -> CSS in commit
It is the FROM field in mailer configuration that needs be used,
not the USER field, which is for authentication.
Closes #3615