update patch 1

This commit is contained in:
fiqhpratama
2024-12-02 01:18:34 +07:00
parent 453d9bb470
commit 25026b0a85
3380 changed files with 103529 additions and 363623 deletions
+11 -6
View File
@@ -142,10 +142,10 @@ class EsmtpTransport extends SmtpTransport
private function doEhloCommand(): string
{
try {
$response = $this->executeCommand(sprintf("EHLO %s\r\n", $this->getLocalDomain()), [250]);
$response = $this->executeCommand(\sprintf("EHLO %s\r\n", $this->getLocalDomain()), [250]);
} catch (TransportExceptionInterface $e) {
try {
return parent::executeCommand(sprintf("HELO %s\r\n", $this->getLocalDomain()), [250]);
return parent::executeCommand(\sprintf("HELO %s\r\n", $this->getLocalDomain()), [250]);
} catch (TransportExceptionInterface $ex) {
if (!$ex->getCode()) {
throw $e;
@@ -169,7 +169,7 @@ class EsmtpTransport extends SmtpTransport
throw new TransportException('Unable to connect with STARTTLS.');
}
$response = $this->executeCommand(sprintf("EHLO %s\r\n", $this->getLocalDomain()), [250]);
$response = $this->executeCommand(\sprintf("EHLO %s\r\n", $this->getLocalDomain()), [250]);
$this->capabilities = $this->parseCapabilities($response);
}
@@ -195,6 +195,11 @@ class EsmtpTransport extends SmtpTransport
return $capabilities;
}
protected function serverSupportsSmtpUtf8(): bool
{
return \array_key_exists('SMTPUTF8', $this->capabilities);
}
private function handleAuth(array $modes): void
{
if (!$this->username) {
@@ -231,12 +236,12 @@ class EsmtpTransport extends SmtpTransport
}
if (!$authNames) {
throw new TransportException(sprintf('Failed to find an authenticator supported by the SMTP server, which currently supports: "%s".', implode('", "', $modes)), $code ?: 504);
throw new TransportException(\sprintf('Failed to find an authenticator supported by the SMTP server, which currently supports: "%s".', implode('", "', $modes)), $code ?: 504);
}
$message = sprintf('Failed to authenticate on SMTP server with username "%s" using the following authenticators: "%s".', $this->username, implode('", "', $authNames));
$message = \sprintf('Failed to authenticate on SMTP server with username "%s" using the following authenticators: "%s".', $this->username, implode('", "', $authNames));
foreach ($errors as $name => $error) {
$message .= sprintf(' Authenticator "%s" returned "%s".', $name, $error);
$message .= \sprintf(' Authenticator "%s" returned "%s".', $name, $error);
}
throw new TransportException($message, $code ?: 535);