summaryrefslogtreecommitdiffstats
path: root/routers/admin/admin.go
diff options
context:
space:
mode:
Diffstat (limited to 'routers/admin/admin.go')
-rw-r--r--routers/admin/admin.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/routers/admin/admin.go b/routers/admin/admin.go
index 547883f7bc..6d3831a9f3 100644
--- a/routers/admin/admin.go
+++ b/routers/admin/admin.go
@@ -61,7 +61,11 @@ func Config(ctx *middleware.Context) {
ctx.Data["DbCfg"] = models.DbCfg
- ctx.Data["Mailer"] = base.MailService
+ ctx.Data["MailerEnabled"] = false
+ if base.MailService != nil {
+ ctx.Data["MailerEnabled"] = true
+ ctx.Data["Mailer"] = base.MailService
+ }
ctx.HTML(200, "admin/config")
}