mirror of
https://github.com/the-djmaze/snappymail.git
synced 2024-09-20 15:45:55 +08:00
Fix "CantSendMessage error" (#1436)
This commit is contained in:
parent
2234212201
commit
f4fb6d769d
|
@ -779,11 +779,11 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
do
|
||||
{
|
||||
$this->getNextBuffer();
|
||||
$aParts = \preg_split('/([\s-]+)/', $this->sResponseBuffer, 2, PREG_SPLIT_DELIM_CAPTURE);
|
||||
$aParts = \preg_split('/([\s\-]+)/', $this->sResponseBuffer, 2, PREG_SPLIT_DELIM_CAPTURE);
|
||||
|
||||
if (\is_array($aParts) && 3 === \count($aParts) && \is_numeric($aParts[0]))
|
||||
{
|
||||
if ('-' !== trim($aParts[1]) && !\in_array((int) $aParts[0], $mExpectCode))
|
||||
if ('-' !== \substr($aParts[1], 0, 1) && !\in_array((int) $aParts[0], $mExpectCode))
|
||||
{
|
||||
$this->writeLogException(
|
||||
new Exceptions\NegativeResponseException($this->aResults, \trim(
|
||||
|
@ -801,7 +801,7 @@ class SmtpClient extends \MailSo\Net\NetClient
|
|||
|
||||
$this->aResults[] = $this->sResponseBuffer;
|
||||
}
|
||||
while ('-' === \trim($aParts[1]));
|
||||
while ('-' === \substr($aParts[1], 0, 1));
|
||||
|
||||
$this->writeLog((microtime(true) - $this->iRequestTime),
|
||||
\MailSo\Log\Enumerations\Type::TIME);
|
||||
|
|
Loading…
Reference in a new issue