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 (
35
35
"github.com/go-macaron/session"
36
36
_ "github.com/go-macaron/session/redis" // redis plugin for store session
37
37
"github.com/go-xorm/core"
38
+ "github.com/kballard/go-shellquote"
38
39
"gopkg.in/ini.v1"
39
40
"strk.kbt.io/projects/go/libravatar"
40
41
)
@@ -1358,7 +1359,6 @@ func newMailService() {
1358
1359
1359
1360
UseSendmail : sec .Key ("USE_SENDMAIL" ).MustBool (),
1360
1361
SendmailPath : sec .Key ("SENDMAIL_PATH" ).MustString ("sendmail" ),
1361
- SendmailArgs : sec .Key ("SENDMAIL_ARGS" ).Strings (" " ),
1362
1362
}
1363
1363
MailService .From = sec .Key ("FROM" ).MustString (MailService .User )
1364
1364
@@ -1374,6 +1374,11 @@ func newMailService() {
1374
1374
MailService .FromName = parsed .Name
1375
1375
MailService .FromEmail = parsed .Address
1376
1376
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
+
1377
1382
log .Info ("Mail Service Enabled" )
1378
1383
}
1379
1384
You can’t perform that action at this time.
0 commit comments