-
-
Notifications
You must be signed in to change notification settings - Fork 9.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Mailer/AWS] Custom headers aren't transmitted #45168
[Mailer/AWS] Custom headers aren't transmitted #45168
Comments
that not documented behaviour lead to lost of data for last 21 months. (or i miss something in documentation) |
Is anyone willing to investigate a fix (if that's possible)? |
we've been hit the same issue and according to AWS docs https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html, content node has 3 types Each mailer transport uses a different type to send. see https://github.com/symfony/amazon-mailer/blob/6.2/Transport/SesApiAsyncAwsTransport.php
i've swapped locally to RAW and it works as intended. |
@bogdanbradeanu Are you up for a PR? |
Well, the |
Hey, thanks for your report! |
to me, we should either deprecate the |
I'd be good if it was documented somewhere tbh. That would already help, since as it stands now you either know that behaviour or you don't. |
Hey, thanks for your report! |
Just a quick reminder to make a comment on this. If I don't hear anything I'll close this. |
It's still a problem, I can't send a message with custom headers with a |
Well, someone who understands the issue and shortcomings will have to come up with a PR adding this piece of documentation. |
Let me know if that does the trick or if it needs more information in there. |
This PR was merged into the 5.4 branch. Discussion ---------- [Mailer] Add warning about custom SES headers Fixes symfony/symfony#45168 by mentioning that the provider needs to be ses+https in order to transmit custom headers. Commits ------- cb44ce9 Add warning about custom SES headers
Symfony version(s) affected
5.4.2
Description
When trying to send a custom header towards AWS using the AsyncAws implementation custom headers aren't included.
This seems to be due to the usage of the
Simple
message format that doesn't seem to allow for custom headers:https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html
Upon printing the Api request the headers are nowhere to be found either.
How to reproduce
Add a header to the mail via:
$message->getHeaders()->addTextHeader('x-test', 'test'));
and send it using the
ses+api
DSNPossible Solution
There seems to be a
Raw
message format you can send that allows for custom headers so the package should probably use that.Additional Context
No response
The text was updated successfully, but these errors were encountered: