Apply patch from @cwiedmann but drop -oi option for pipe

Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
pull/12424/head
Carsten Wiedmann 6 years ago committed by Daniel Kesselberg
parent 3da7364c36
commit 446d96f3eb
No known key found for this signature in database
GPG Key ID: 36E3664E099D0614

@ -421,6 +421,19 @@ $CONFIG = array(
*/
'mail_send_plaintext_only' => false,
/**
* Which mode is used for sendmail/qmail: ``smtp`` or ``pipe``.
*
* For ``smtp`` the sendmail binary is started with the parameter ``-bs``:
* - Use the SMTP protocol on standard input and output.
*
* For ``pipe`` the binary is started with the parameters ``-t``:
* - Read message from STDIN and extract recipients.
*
* Defaults to ``smtp``
*/
'mail_sendmailmode' => 'smtp',
/**
* Proxy Configurations
*/

@ -282,6 +282,15 @@ class Mailer implements IMailer {
break;
}
return new \Swift_SendmailTransport($binaryPath . ' -bs');
switch ($this->config->getSystemValue('mail_sendmailmode', 'smtp')) {
case 'pipe':
$binaryParam = ' -t';
break;
default:
$binaryParam = ' -bs';
break;
}
return new \Swift_SendmailTransport($binaryPath . $binaryParam);
}
}

Loading…
Cancel
Save