Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
[Mailer] Improve error message when SMTP server lacks SMTPUTF8 support
  • Loading branch information
ousamabenyounes committed May 11, 2026
commit d198cf8f2be4ddc1f695d552839fceab66cdd726
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ public function testMissingSmtpUtf8()
$message->text('.');

$this->expectException(InvalidArgumentException::class);
$this->expectExceptionMessage('Invalid addresses: non-ASCII characters not supported in local-part of email.');
$this->expectExceptionMessage('The SMTP server does not support the SMTPUTF8 extension required to send to addresses with non-ASCII characters in their local-part.');
$transport->send($message);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -247,7 +247,7 @@ private function doHeloCommand(): void
private function doMailFromCommand(string $address, bool $smtputf8): void
{
if ($smtputf8 && !$this->serverSupportsSmtpUtf8()) {
throw new InvalidArgumentException('Invalid addresses: non-ASCII characters not supported in local-part of email.');
throw new InvalidArgumentException('The SMTP server does not support the SMTPUTF8 extension required to send to addresses with non-ASCII characters in their local-part.');
}
$this->executeCommand(\sprintf("MAIL FROM:<%s>%s\r\n", $address, $smtputf8 ? ' SMTPUTF8' : ''), [250]);
}
Expand Down
Loading