Symfony\Component\Mailer\Exception\TransportException {#4138 -debug: "" }
$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);
}
throw new TransportException($message);
}
}
$capabilities = $this->callHeloCommand();
}
if (\array_key_exists('AUTH', $capabilities)) {
$this->handleAuth($capabilities['AUTH']);
}
}
private function callHeloCommand(): array
{
$this->getLogger()->debug(sprintf('Email transport "%s" starting', __CLASS__));
$this->stream->initialize();
$this->assertResponseCode($this->getFullResponse(), [220]);
$this->doHeloCommand();
$this->started = true;
$this->lastMessageTime = 0;
$this->getLogger()->debug(sprintf('Email transport "%s" started', __CLASS__));
}
if (microtime(true) - $this->lastMessageTime > $this->pingThreshold) {
$this->ping();
}
if (!$this->started) {
$this->start();
}
try {
$envelope = $message->getEnvelope();
$this->doMailFromCommand($envelope->getSender()->getEncodedAddress());
$envelope = $event->getEnvelope();
$message = $event->getMessage();
}
$message = new SentMessage($message, $envelope);
$this->doSend($message);
$this->checkThrottling();
return $message;
}
}
public function send(RawMessage $message, Envelope $envelope = null): ?SentMessage
{
try {
$message = parent::send($message, $envelope);
} catch (TransportExceptionInterface $e) {
if ($this->started) {
try {
$this->executeCommand("RSET\r\n", [250]);
} catch (TransportExceptionInterface $_) {
public function send(RawMessage $message, Envelope $envelope = null): ?SentMessage
{
/** @var Message $message */
if (RawMessage::class === \get_class($message) || !$message->getHeaders()->has('X-Transport')) {
return $this->default->send($message, $envelope);
}
$headers = $message->getHeaders();
$transport = $headers->get('X-Transport')->getBody();
$headers->remove('X-Transport');
$this->transport = $transport;
}
public function __invoke(SendEmailMessage $message): ?SentMessage
{
return $this->transport->send($message->getMessage(), $message->getEnvelope());
}
}
throw $ack->getError();
} else {
$result = $ack->getResult();
}
} else {
$result = $handler($message);
}
$handledStamp = HandledStamp::fromDescriptor($handlerDescriptor, $result);
$envelope = $envelope->with($handledStamp);
$this->logger->info('Message {class} handled by {handler}', $context + ['handler' => $handledStamp->getHandlerName()]);
$envelope = $sender->send($envelope->with(new SentStamp(\get_class($sender), \is_string($alias) ? $alias : null)));
}
}
if (null === $sender) {
return $stack->next()->handle($envelope, $stack);
}
// message should only be sent and not be handled by the next middleware
return $envelope;
}
// mark the message as "received" from the original transport
// this guarantees the same behavior as when originally received
$envelope = $envelope->with(new ReceivedStamp($sentToFailureStamp->getOriginalReceiverName()));
}
return $stack->next()->handle($envelope, $stack);
}
}
// First time we get here, mark as inside a "root dispatch" call:
$this->isRootDispatchCallRunning = true;
try {
// Execute the whole middleware stack & message handling for main dispatch:
$returnedEnvelope = $stack->next()->handle($envelope, $stack);
} catch (\Throwable $exception) {
/*
* Whenever an exception occurs while handling a message that has
* queued other messages, we drop the queued ones.
* This is intentional since the queued commands were likely dependent
$amqpReceivedStamp = $envelope->last(LegacyAmqpReceivedStamp::class);
if ($amqpReceivedStamp instanceof LegacyAmqpReceivedStamp && $amqpReceivedStamp->getAmqpEnvelope()->isRedelivery()) {
throw new RejectRedeliveredMessageException('Redelivered message from AMQP detected that will be rejected and trigger the retry logic.');
}
return $stack->next()->handle($envelope, $stack);
}
}
{
if (null === $envelope->last(BusNameStamp::class)) {
$envelope = $envelope->with(new BusNameStamp($this->busName));
}
return $stack->next()->handle($envelope, $stack);
}
}
if (!$middlewareIterator->valid()) {
return $envelope;
}
$stack = new StackMiddleware($middlewareIterator);
return $middlewareIterator->current()->handle($envelope, $stack);
}
}
$event = new MessageEvent($clonedMessage, $clonedEnvelope, (string) $this->transport, true);
$this->dispatcher->dispatch($event);
}
try {
$this->bus->dispatch(new SendEmailMessage($message, $envelope));
} catch (HandlerFailedException $e) {
foreach ($e->getNestedExceptions() as $nested) {
if ($nested instanceof TransportExceptionInterface) {
throw $nested;
}
*
* @return void
*/
protected function send(string $content, array $records)
{
$this->mailer->send($this->buildMessage($content, $records));
}
/**
* Gets the formatter for the Message subject.
*
}
}
private function doWrite(array|LogRecord $record): void
{
$this->send((string) $record['formatted'], [$record]);
}
/**
* Send a mail with the given content.
*
{
abstract private function doWrite(array|LogRecord $record): void;
protected function write(array $record): void
{
$this->doWrite($record);
}
}
}
$record = $this->processRecord($record);
}
$record['formatted'] = $this->getFormatter()->format($record);
$this->write($record);
return false === $this->bubble;
}
/**
}
}
// once the record exists, send it to all handlers as long as the bubbling chain is not interrupted
try {
if (true === $handler->handle($record)) {
break;
}
} catch (Throwable $e) {
$this->handleException($e, $record);
* @param string|Stringable $message The log message
* @param mixed[] $context The log context
*/
public function critical($message, array $context = []): void
{
$this->addRecord(static::CRITICAL, (string) $message, $context);
}
/**
* Adds a log record at the ALERT level.
*
{
if (null !== $this->logger) {
if (null !== $logLevel) {
$this->logger->log($logLevel, $message, ['exception' => $exception]);
} elseif (!$exception instanceof HttpExceptionInterface || $exception->getStatusCode() >= 500) {
$this->logger->critical($message, ['exception' => $exception]);
} else {
$this->logger->error($message, ['exception' => $exception]);
}
}
}
break;
}
$e = FlattenException::createFromThrowable($throwable);
$this->logException($throwable, sprintf('Uncaught PHP Exception %s: "%s" at %s line %s', $e->getClass(), $e->getMessage(), $e->getFile(), $e->getLine()), $logLevel);
}
public function onKernelException(ExceptionEvent $event)
{
if (null === $this->controller) {
foreach ($listeners as $listener) {
if ($stoppable && $event->isPropagationStopped()) {
break;
}
$listener($event, $eventName, $this);
}
}
/**
* Sorts the internal list of listeners for the given event by priority.
} else {
$listeners = $this->getListeners($eventName);
}
if ($listeners) {
$this->callListeners($listeners, $eventName, $event);
}
return $event;
}
) {
}
public function dispatch(object $event, string $eventName = null): object
{
$event = parent::dispatch($event, $eventName);
if ($event instanceof ConfigurableEvent && $this->site->hasSite()) {
if (!$eventName) {
$eventName = get_class($event);
}
$this->runEvents($event, (string)$eventName);
* @throws \Exception
*/
private function handleThrowable(\Throwable $e, Request $request, int $type): Response
{
$event = new ExceptionEvent($this, $request, $type, $e);
$this->dispatcher->dispatch($event, KernelEvents::EXCEPTION);
// a listener might have replaced the exception
$e = $event->getThrowable();
if (!$event->hasResponse()) {
if ($pop = $request !== $this->requestStack->getMainRequest()) {
$this->requestStack->push($request);
}
try {
$response = $this->handleThrowable($exception, $request, self::MAIN_REQUEST);
} finally {
if ($pop) {
$this->requestStack->pop();
}
}
if ($hasRun) {
throw $e;
}
$hasRun = true;
$kernel->terminateWithException($e, $request);
};
}
} elseif ($event instanceof ConsoleEvent && $app = $event->getCommand()->getApplication()) {
$output = $event->getOutput();
if ($output instanceof ConsoleOutputInterface) {
$this->exceptionHandler = null;
}
try {
if (null !== $exceptionHandler) {
$exceptionHandler($exception);
return;
}
$handlerException ??= $exception;
} catch (\Throwable $handlerException) {
TransportException
|
---|
Symfony\Component\Mailer\Exception\TransportException: Failed to authenticate on SMTP server with username "email@hubburger.com" using the following authenticators: "LOGIN", "PLAIN". Authenticator "LOGIN" returned "Expected response code "235" but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6".". Authenticator "PLAIN" returned "Expected response code "235" but got code "535", with message "535 5.7.8 Error: authentication failed: UGFzc3dvcmQ6".". at /var/www/html/apps/cms/vendor/symfony/mailer/Transport/Smtp/EsmtpTransport.php:198 at Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport->handleAuth() (/var/www/html/apps/cms/vendor/symfony/mailer/Transport/Smtp/EsmtpTransport.php:123) at Symfony\Component\Mailer\Transport\Smtp\EsmtpTransport->doHeloCommand() (/var/www/html/apps/cms/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php:253) at Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->start() (/var/www/html/apps/cms/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php:194) at Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->doSend() (/var/www/html/apps/cms/vendor/symfony/mailer/Transport/AbstractTransport.php:72) at Symfony\Component\Mailer\Transport\AbstractTransport->send() (/var/www/html/apps/cms/vendor/symfony/mailer/Transport/Smtp/SmtpTransport.php:136) at Symfony\Component\Mailer\Transport\Smtp\SmtpTransport->send() (/var/www/html/apps/cms/vendor/symfony/mailer/Transport/Transports.php:51) at Symfony\Component\Mailer\Transport\Transports->send() (/var/www/html/apps/cms/vendor/symfony/mailer/Messenger/MessageHandler.php:31) at Symfony\Component\Mailer\Messenger\MessageHandler->__invoke() (/var/www/html/apps/cms/vendor/symfony/messenger/Middleware/HandleMessageMiddleware.php:97) at Symfony\Component\Messenger\Middleware\HandleMessageMiddleware->handle() (/var/www/html/apps/cms/vendor/symfony/messenger/Middleware/SendMessageMiddleware.php:73) at Symfony\Component\Messenger\Middleware\SendMessageMiddleware->handle() (/var/www/html/apps/cms/vendor/symfony/messenger/Middleware/FailedMessageProcessingMiddleware.php:34) at Symfony\Component\Messenger\Middleware\FailedMessageProcessingMiddleware->handle() (/var/www/html/apps/cms/vendor/symfony/messenger/Middleware/DispatchAfterCurrentBusMiddleware.php:68) at Symfony\Component\Messenger\Middleware\DispatchAfterCurrentBusMiddleware->handle() (/var/www/html/apps/cms/vendor/symfony/messenger/Middleware/RejectRedeliveredMessageMiddleware.php:48) at Symfony\Component\Messenger\Middleware\RejectRedeliveredMessageMiddleware->handle() (/var/www/html/apps/cms/vendor/symfony/messenger/Middleware/AddBusNameStampMiddleware.php:37) at Symfony\Component\Messenger\Middleware\AddBusNameStampMiddleware->handle() (/var/www/html/apps/cms/vendor/symfony/messenger/MessageBus.php:77) at Symfony\Component\Messenger\MessageBus->dispatch() (/var/www/html/apps/cms/vendor/symfony/mailer/Mailer.php:63) at Symfony\Component\Mailer\Mailer->send() (/var/www/html/apps/cms/vendor/symfony/monolog-bridge/Handler/MailerHandler.php:85) at Symfony\Bridge\Monolog\Handler\MailerHandler->send() (/var/www/html/apps/cms/vendor/symfony/monolog-bridge/Handler/MailerHandler.php:72) at Symfony\Bridge\Monolog\Handler\MailerHandler->doWrite() (/var/www/html/apps/cms/vendor/symfony/monolog-bridge/Handler/CompatibilityProcessingHandler.php:48) at Symfony\Bridge\Monolog\Handler\MailerHandler->write() (/var/www/html/apps/cms/vendor/monolog/monolog/src/Monolog/Handler/AbstractProcessingHandler.php:48) at Monolog\Handler\AbstractProcessingHandler->handle() (/var/www/html/apps/cms/vendor/monolog/monolog/src/Monolog/Logger.php:399) at Monolog\Logger->addRecord() (/var/www/html/apps/cms/vendor/monolog/monolog/src/Monolog/Logger.php:663) at Monolog\Logger->critical() (/var/www/html/apps/cms/vendor/symfony/http-kernel/EventListener/ErrorListener.php:164) at Symfony\Component\HttpKernel\EventListener\ErrorListener->logException() (/var/www/html/apps/cms/vendor/symfony/http-kernel/EventListener/ErrorListener.php:78) at Symfony\Component\HttpKernel\EventListener\ErrorListener->logKernelException() (/var/www/html/apps/cms/vendor/symfony/event-dispatcher/EventDispatcher.php:220) at Symfony\Component\EventDispatcher\EventDispatcher->callListeners() (/var/www/html/apps/cms/vendor/symfony/event-dispatcher/EventDispatcher.php:56) at Symfony\Component\EventDispatcher\EventDispatcher->dispatch() (/var/www/html/apps/cms/vendor/kingapp/event/Service/EventDispatcher.php:30) at KingApp\EventBundle\Service\EventDispatcher->dispatch() (/var/www/html/apps/cms/vendor/symfony/http-kernel/HttpKernel.php:223) at Symfony\Component\HttpKernel\HttpKernel->handleThrowable() (/var/www/html/apps/cms/vendor/symfony/http-kernel/HttpKernel.php:114) at Symfony\Component\HttpKernel\HttpKernel->terminateWithException() (/var/www/html/apps/cms/vendor/symfony/http-kernel/EventListener/DebugHandlersListener.php:131) at Symfony\Component\HttpKernel\EventListener\DebugHandlersListener::Symfony\Component\HttpKernel\EventListener\{closure}() (/var/www/html/apps/cms/vendor/symfony/error-handler/ErrorHandler.php:537) at Symfony\Component\ErrorHandler\ErrorHandler->handleException() |