diff options
author | Jonas Bröms <cez81@users.noreply.github.com> | 2017-10-25 21:27:25 +0200 |
---|---|---|
committer | Lauris BH <lauris@nix.lv> | 2017-10-25 22:27:25 +0300 |
commit | e86a0bf3feab82c1b3439806245083dffb2f37c9 (patch) | |
tree | 8c47d111db8214dbbf3c291a43ad5793a49874b2 /modules/mailer | |
parent | 3af5b67ed030f84c7269d091add9e476537d30d7 (diff) | |
download | gitea-e86a0bf3feab82c1b3439806245083dffb2f37c9.tar.gz gitea-e86a0bf3feab82c1b3439806245083dffb2f37c9.zip |
Add support for extra sendmail arguments (#2731)
* Add support for extra sendmail arguments
* Sendmail args to exec.command should be a list
* Add go-shellquote package
* Use go-shellquote lib for parsing Sendmail args
* Only parse if sendmail is configured
Diffstat (limited to 'modules/mailer')
-rw-r--r-- | modules/mailer/mailer.go | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/modules/mailer/mailer.go b/modules/mailer/mailer.go index 0bb78de92a..a54e836173 100644 --- a/modules/mailer/mailer.go +++ b/modules/mailer/mailer.go @@ -209,6 +209,7 @@ func (s *sendmailSender) Send(from string, to []string, msg io.WriterTo) error { var waitError error args := []string{"-F", from, "-i"} + args = append(args, setting.MailService.SendmailArgs...) args = append(args, to...) log.Trace("Sending with: %s %v", setting.MailService.SendmailPath, args) cmd := exec.Command(setting.MailService.SendmailPath, args...) |