Skip to content

[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

Closed
wants to merge 7 commits into from

Conversation

cfoehrdes
Copy link

Q A
Branch? 4.4/5.0
Bug fix? yes
New feature? no
Deprecations? no
Tickets Fix #35037
License MIT
Doc PR -

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 and SendRawMail AWS API endpoints.

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Dec 19, 2019
@nicolas-grekas
Copy link
Member

Can you please add a test case?

@cfoehrdes
Copy link
Author

@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.

@fabpot
Copy link
Member

fabpot commented Jan 12, 2020

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.

@cfoehrdes
Copy link
Author

@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:

@fabpot
Copy link
Member

fabpot commented Aug 11, 2020

I'm wondering it #35992 makes this PR not needed anymore.

@fabpot
Copy link
Member

fabpot commented Aug 20, 2020

Closing as the code changed here is deprecated is favor of new classes.

@fabpot fabpot closed this Aug 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants