mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-08-03 00:45:22 +02:00
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
This commit is contained in:
parent
3af5b67ed0
commit
e86a0bf3fe
9 changed files with 322 additions and 0 deletions
|
@ -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...)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue