Update Account.php

Bugfix send message using PHP mail() failed
This commit is contained in:
the-djmaze 2023-01-28 00:09:56 +01:00 committed by GitHub
parent 352ef98bc6
commit c6500dfe14
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -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)) {