-
-
Notifications
You must be signed in to change notification settings - Fork 9.8k
Closed
Description
Symfony version(s) affected
6.1.0
Description
In #33967 multiple Mailer Transports were adapted to use $sentMessage->setMessageId(<final Message ID>);.
Among them SesApiTransport and SesHttpTransport but SesSmtpTranspor was not: It still provides the original Message-id (set by Symfony itself).
Since symfony/mailer is often used to abstract transport-specific logic it may easily result in errors where the return value is not the expected one. (In my case I need to check for actual deliverability against AWS SNS service what can only work if I stored the AWS-issued Message-ID)
How to reproduce
MAILER_DSN=ses+smtp://foo:bar@default?region=eu-west-1
$mailer->send($message);
echo $mailer->getMessageId();Possible Solution
As per https://docs.aws.amazon.com/ses/latest/dg/troubleshoot-smtp.html
The Message-Id is returned as part of the 250 Ok response to the DATA SMTP command.