aboutsummaryrefslogtreecommitdiff
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
authorUnknwon <u@gogs.io>2017-01-30 07:20:48 -0500
committerUnknwon <u@gogs.io>2017-01-30 07:20:48 -0500
commit4bc98f7aa2b94a18ddaef26f64ae01c2d38fb552 (patch)
treec3e3852d32a34bb1099b92585183493e9efa4d8b /routers/admin/admin.go
parent207960b459d635667226d2d78f11ef3279ba9cc7 (diff)
Move models/mail.go to modules/mail.go
To use interface to replace *models.User in avoiding cycle import.
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go3
1 files changed, 2 insertions, 1 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 1b22251e..e0eb9256 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -17,6 +17,7 @@ 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"
)
@@ -177,7 +178,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 := models.SendTestMail(email); err != nil {
+ if err := mailer.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))