diff options
author | Unknown <joe2010xtmf@163.com> | 2014-03-23 19:09:11 -0400 |
---|---|---|
committer | Unknown <joe2010xtmf@163.com> | 2014-03-23 19:09:11 -0400 |
commit | b9b82cfe477bcbfd3541adfc969ff20210d56549 (patch) | |
tree | 36020ddd1605414d1f11d1e0201d1ab05afe2880 /modules | |
parent | 003298ef1d53e1d9837bcac5aadb2e9e159a7497 (diff) | |
download | gitea-b9b82cfe477bcbfd3541adfc969ff20210d56549.tar.gz gitea-b9b82cfe477bcbfd3541adfc969ff20210d56549.zip |
Mirror updates
Diffstat (limited to 'modules')
-rw-r--r-- | modules/base/conf.go | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/modules/base/conf.go b/modules/base/conf.go index b243a6ad58..2bf529d9d1 100644 --- a/modules/base/conf.go +++ b/modules/base/conf.go @@ -66,6 +66,7 @@ var Service struct { DisenableRegisteration bool RequireSignInView bool EnableCacheAvatar bool + NotifyMail bool ActiveCodeLives int ResetPwdCodeLives int } @@ -230,6 +231,17 @@ func newRegisterMailService() { log.Info("Register Mail Service Enabled") } +func newNotifyMailService() { + if !Cfg.MustBool("service", "ENABLE_NOTIFY_MAIL") { + return + } else if MailService == nil { + log.Warn("Notify Mail Service: Mail Service is not enabled") + return + } + Service.NotifyMail = true + log.Info("Notify Mail Service Enabled") +} + func NewConfigContext() { var err error workDir, err := exeDir() @@ -284,4 +296,5 @@ func NewServices() { newSessionService() newMailService() newRegisterMailService() + newNotifyMailService() } |