Signed-off-by: Daniel Kesselberg <mail@danielkesselberg.de>tags/v16.0.0alpha1
@@ -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); | |||
} | |||
} |