mirror of
https://github.com/go-gitea/gitea
synced 2025-07-23 10:48:37 +00:00
Send registration email on user autoregistration (#16523)
When users login and are autoregistered send email notification. Fix #16178 * Protect public functions within the mailer by testing if the mailer is configured Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
This commit is contained in:
@@ -23,6 +23,11 @@ const (
|
||||
|
||||
// MailNewRelease send new release notify to all all repo watchers.
|
||||
func MailNewRelease(rel *models.Release) {
|
||||
if setting.MailService == nil {
|
||||
// No mail service configured
|
||||
return
|
||||
}
|
||||
|
||||
watcherIDList, err := models.GetRepoWatchersIDs(rel.RepoID)
|
||||
if err != nil {
|
||||
log.Error("GetRepoWatchersIDs(%d): %v", rel.RepoID, err)
|
||||
|
Reference in New Issue
Block a user