From c6500dfe14b3b938972318a102004ca35c5d447d Mon Sep 17 00:00:00 2001 From: the-djmaze <3752035+the-djmaze@users.noreply.github.com> Date: Sat, 28 Jan 2023 00:09:56 +0100 Subject: [PATCH] Update Account.php Bugfix send message using PHP mail() failed --- snappymail/v/0.0.0/app/libraries/RainLoop/Model/Account.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/snappymail/v/0.0.0/app/libraries/RainLoop/Model/Account.php b/snappymail/v/0.0.0/app/libraries/RainLoop/Model/Account.php index 92b767e57..3004a450c 100644 --- a/snappymail/v/0.0.0/app/libraries/RainLoop/Model/Account.php +++ b/snappymail/v/0.0.0/app/libraries/RainLoop/Model/Account.php @@ -244,9 +244,11 @@ abstract class Account implements \JsonSerializable $oSettings->Ehlo = \MailSo\Smtp\SmtpClient::EhloHelper(); $oPlugins->RunHook('smtp.before-connect', array($this, $oSmtpClient, $oSettings)); - if (!$oSettings->usePhpMail) { - $oSmtpClient->Connect($oSettings, $oSettings->Ehlo); + if ($oSettings->usePhpMail) { + $bUsePhpMail = true; + return true; } + $oSmtpClient->Connect($oSettings, $oSettings->Ehlo); $oPlugins->RunHook('smtp.after-connect', array($this, $oSmtpClient, $oSettings)); /* if ($this->oDomain->OutAskCredentials() && !($this->sSmtpPassword && $this->sSmtpLogin)) {