You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When sending an email using the Postmark API transport, with a Date header set, postmark rejects the message, and the transport throws this exception:
Fatal error: Uncaught Symfony\Component\Mailer\Exception\HttpTransportException:
Unable to send an email: Header 'Date' not allowed. (code 300). in
/vendor/symfony/postmark-mailer/Transport/PostmarkApiTransport.php:72
How to reproduce
$transport = new \Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkApiTransport('***');
$email = new \Symfony\Component\Mime\Email();
$email->text(date('c'))
->to('foo@localhost')
->from('bar@localhost')
->date(new \DateTimeImmutable());
$transport->send($email);
//PHP Fatal error: Uncaught Symfony\Component\Mailer\Exception\HttpTransportException: Unable to send an email: Header 'Date' not allowed. (code 300). in vendor/symfon/postmark-
mailer/Transpor/PostmarkApiTransport.php:72
…ansport (xabbuh)
This PR was merged into the 6.4 branch.
Discussion
----------
[Mailer][Postmark] drop the `Date` header using the API transport
| Q | A
| ------------- | ---
| Branch? | 6.4
| Bug fix? | yes
| New feature? | no
| Deprecations? | no
| Issues | Fix#60254
| License | MIT
Commits
-------
2db187a drop the Date header using the Postmark API transport
Symfony version(s) affected
6.4.19
Description
When sending an email using the Postmark API transport, with a Date header set, postmark rejects the message, and the transport throws this exception:
How to reproduce
Possible Solution
Fix is to add 'date' to this exclusion list: https://github.com/symfony/postmark-mailer/blob/7.2/Transport/PostmarkApiTransport.php#L113
Workaround is to remove the date header from the email before sending it.
Additional Context
No response
The text was updated successfully, but these errors were encountered: