Apply patch from @cwiedmann but drop -oi option for pipe
Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>
This commit is contained in:
parent
3da7364c36
commit
446d96f3eb
2 changed files with 23 additions and 1 deletions
|
@ -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…
Reference in a new issue