diff --git a/doc/admin.md b/doc/admin.md index 5f280af224..fa36c245b3 100644 --- a/doc/admin.md +++ b/doc/admin.md @@ -56,6 +56,10 @@ Configure how often Mail keeps users' mailboxes updated in the background in sec ``` ### Use php-mail for sending mail + +> [!WARNING] +> Support for using php-mail will be removed with Mail 4.2 + You can use the php-mail function to send mails. This is needed for some webhosters (1&1 (1und1)): ```php 'app.mail.transport' => 'php-mail' diff --git a/lib/SMTP/SmtpClientFactory.php b/lib/SMTP/SmtpClientFactory.php index 3d63195fba..e5c84bae4a 100644 --- a/lib/SMTP/SmtpClientFactory.php +++ b/lib/SMTP/SmtpClientFactory.php @@ -43,10 +43,6 @@ public function __construct(IConfig $config, */ public function create(Account $account): Horde_Mail_Transport { $mailAccount = $account->getMailAccount(); - $transport = $this->config->getSystemValue('app.mail.transport', 'smtp'); - if ($transport === 'php-mail') { - return new Horde_Mail_Transport_Mail(); - } $decryptedPassword = null; if ($mailAccount->getOutboundPassword() !== null) { diff --git a/lib/SystemConfig.php b/lib/SystemConfig.php deleted file mode 100644 index b16b9bca90..0000000000 --- a/lib/SystemConfig.php +++ /dev/null @@ -1,25 +0,0 @@ -config = $config; - } - - public function hasWorkingSmtp(): bool { - return $this->config->getSystemValue('app.mail.transport', 'smtp') === 'smtp'; - } -}