mirror of
https://github.com/nextcloud/server.git
synced 2026-06-11 01:30:50 -04:00
Merge pull request #43789 from nextcloud/backport/39607/stable27
This commit is contained in:
commit
7b9fed1cb5
3 changed files with 6 additions and 10 deletions
|
|
@ -45,7 +45,7 @@ if ($_['mail_smtpmode'] === 'qmail') {
|
|||
|
||||
$mail_sendmailmode = [
|
||||
'smtp' => 'smtp (-bs)',
|
||||
'pipe' => 'pipe (-t)'
|
||||
'pipe' => 'pipe (-t -i)'
|
||||
];
|
||||
|
||||
?>
|
||||
|
|
|
|||
|
|
@ -350,14 +350,10 @@ class Mailer implements IMailer {
|
|||
break;
|
||||
}
|
||||
|
||||
switch ($this->config->getSystemValueString('mail_sendmailmode', 'smtp')) {
|
||||
case 'pipe':
|
||||
$binaryParam = ' -t';
|
||||
break;
|
||||
default:
|
||||
$binaryParam = ' -bs';
|
||||
break;
|
||||
}
|
||||
$binaryParam = match ($this->config->getSystemValueString('mail_sendmailmode', 'smtp')) {
|
||||
'pipe' => ' -t -i',
|
||||
default => ' -bs',
|
||||
};
|
||||
|
||||
return new SendmailTransport($binaryPath . $binaryParam, null, $this->logger);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -72,7 +72,7 @@ class MailerTest extends TestCase {
|
|||
public function sendmailModeProvider(): array {
|
||||
return [
|
||||
'smtp' => ['smtp', ' -bs'],
|
||||
'pipe' => ['pipe', ' -t'],
|
||||
'pipe' => ['pipe', ' -t -i'],
|
||||
];
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue