-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] fixed destination override by envelope in amazon api transport #35042
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
Conversation
Can you please add a test case? |
@nicolas-grekas I could not find any other transport mocking the API they are calling. I wrote a test for normal submission and an envelope example. Happy to hear some feedback. |
6cebe71
to
81bcaec
Compare
81bcaec
to
6cebe71
Compare
I've just read your last comment on the issue and that made me re-read this PR. The difference between the API and HTTP transports is the following (true for all transports): API should use the API abstraction of the transport (the transport is responsible for generating the email as a string). For the HTTPS transport, Symfony is responsible for generating the email as a string. |
@fabpot thank you for the clarification. I tried understanding the existing transports and did more local testing. I have a couple of questions to have my PR aligning to the concept:
|
I'm wondering it #35992 makes this PR not needed anymore. |
Closing as the code changed here is deprecated is favor of new classes. |
Fixes recipients not being replaced if an email has an attachment and recipients have been set on the envelope. Also ensures recipients from envelope are used as message destination if they differ from the email header recipients. The comparison of the header and envelope recipients ensure the destination is only overridden if required, otherwise the cc/bcc classification would be lost. It is not necessary to have a condition and switching between
SendMail
andSendRawMail
AWS API endpoints.