diff options
author | Unknwon <u@gogs.io> | 2016-07-16 00:36:39 +0800 |
---|---|---|
committer | Unknwon <u@gogs.io> | 2016-07-16 00:36:39 +0800 |
commit | f1b8d52eb3ac230ed5a275f4a844ddb0cf48041e (patch) | |
tree | 51dda05a9fb7a985a4e91f3e1708ffddf3fee19c /routers/admin | |
parent | 7ca5f8f119593023809e6130db75154597c52426 (diff) | |
download | gitea-f1b8d52eb3ac230ed5a275f4a844ddb0cf48041e.tar.gz gitea-f1b8d52eb3ac230ed5a275f4a844ddb0cf48041e.zip |
#2854 fix no mail notification when issue is closed/reopened
Diffstat (limited to 'routers/admin')
-rw-r--r-- | routers/admin/admin.go | 3 | ||||
-rw-r--r-- | routers/admin/users.go | 5 |
2 files changed, 3 insertions, 5 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go index 1608b73b11..bc850b638e 100644 --- a/routers/admin/admin.go +++ b/routers/admin/admin.go @@ -17,7 +17,6 @@ import ( "github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/cron" - "github.com/gogits/gogs/modules/mailer" "github.com/gogits/gogs/modules/process" "github.com/gogits/gogs/modules/setting" ) @@ -178,7 +177,7 @@ func Dashboard(ctx *context.Context) { func SendTestMail(ctx *context.Context) { email := ctx.Query("email") // Send a test email to the user's email address and redirect back to Config - if err := mailer.SendTestMail(email); err != nil { + if err := models.SendTestMail(email); err != nil { ctx.Flash.Error(ctx.Tr("admin.config.test_mail_failed", email, err)) } else { ctx.Flash.Info(ctx.Tr("admin.config.test_mail_sent", email)) diff --git a/routers/admin/users.go b/routers/admin/users.go index 76fbcd1683..2eca243b6c 100644 --- a/routers/admin/users.go +++ b/routers/admin/users.go @@ -14,7 +14,6 @@ import ( "github.com/gogits/gogs/modules/base" "github.com/gogits/gogs/modules/context" "github.com/gogits/gogs/modules/log" - "github.com/gogits/gogs/modules/mailer" "github.com/gogits/gogs/modules/setting" "github.com/gogits/gogs/routers" ) @@ -115,9 +114,9 @@ func NewUserPost(ctx *context.Context, form auth.AdminCrateUserForm) { } log.Trace("Account created by admin (%s): %s", ctx.User.Name, u.Name) - // Send e-mail notification. + // Send email notification. if form.SendNotify && setting.MailService != nil { - mailer.SendRegisterNotifyMail(ctx.Context, u) + models.SendRegisterNotifyMail(ctx.Context, u) } ctx.Flash.Success(ctx.Tr("admin.users.new_success", u.Name)) |