File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -35,6 +35,7 @@ import (
3535 "github.com/go-macaron/session"
3636 _ "github.com/go-macaron/session/redis" // redis plugin for store session
3737 "github.com/go-xorm/core"
38+ "github.com/kballard/go-shellquote"
3839 "gopkg.in/ini.v1"
3940 "strk.kbt.io/projects/go/libravatar"
4041)
@@ -1358,7 +1359,6 @@ func newMailService() {
13581359
13591360 UseSendmail : sec .Key ("USE_SENDMAIL" ).MustBool (),
13601361 SendmailPath : sec .Key ("SENDMAIL_PATH" ).MustString ("sendmail" ),
1361- SendmailArgs : sec .Key ("SENDMAIL_ARGS" ).Strings (" " ),
13621362 }
13631363 MailService .From = sec .Key ("FROM" ).MustString (MailService .User )
13641364
@@ -1374,6 +1374,11 @@ func newMailService() {
13741374 MailService .FromName = parsed .Name
13751375 MailService .FromEmail = parsed .Address
13761376
1377+ MailService .SendmailArgs , err = shellquote .Split (sec .Key ("SENDMAIL_ARGS" ).String ())
1378+ if err != nil && MailService .UseSendmail {
1379+ log .Error (4 , "Failed to parse Sendmail args: %v" , CustomConf , err )
1380+ }
1381+
13771382 log .Info ("Mail Service Enabled" )
13781383}
13791384
You can’t perform that action at this time.
0 commit comments