try { return parent::
executeCommand(sprintf("HELO %s\r\n",
$this->
getLocalDomain()),
[250
]);
} catch (TransportExceptionInterface
$ex) { if (!
$ex->
getCode()) { throw $e;
} throw $ex;
} } $this->capabilities =
$this->
parseCapabilities($response);
/** @var SocketStream $stream */
$stream =
$this->
getStream();
// WARNING: !$stream->isTLS() is right, 100% sure :)
// if you think that the ! should be removed, read the code again
// if doing so "fixes" your issue then it probably means your SMTP server behaves incorrectly or is wrongly configured
if (!
$stream->
isTLS() && \
defined('OPENSSL_VERSION_NUMBER'
) && \
array_key_exists('STARTTLS',
$this->capabilities
)) { $this->
executeCommand("STARTTLS\r\n",
[220
]);
if (!
$stream->
startTLS()) { throw new TransportException('Unable to connect with STARTTLS.'
);
}