diff options
Diffstat (limited to 'modules/setting/setting.go')
-rw-r--r-- | modules/setting/setting.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/modules/setting/setting.go b/modules/setting/setting.go index cb8cf7d39a..7706ee3e95 100644 --- a/modules/setting/setting.go +++ b/modules/setting/setting.go @@ -35,6 +35,7 @@ import ( "github.com/go-macaron/session" _ "github.com/go-macaron/session/redis" // redis plugin for store session "github.com/go-xorm/core" + "github.com/kballard/go-shellquote" "gopkg.in/ini.v1" "strk.kbt.io/projects/go/libravatar" ) @@ -1326,6 +1327,7 @@ type Mailer struct { // Sendmail sender UseSendmail bool SendmailPath string + SendmailArgs []string } var ( @@ -1372,6 +1374,13 @@ func newMailService() { MailService.FromName = parsed.Name MailService.FromEmail = parsed.Address + if MailService.UseSendmail { + MailService.SendmailArgs, err = shellquote.Split(sec.Key("SENDMAIL_ARGS").String()) + if err != nil { + log.Error(4, "Failed to parse Sendmail args: %v", CustomConf, err) + } + } + log.Info("Mail Service Enabled") } |