Skip to content

[Mailer] [Mailgun] Allow multiple TagHeaders with MailgunApiTransport #44137

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

Merged
merged 1 commit into from
Dec 11, 2021
Merged

[Mailer] [Mailgun] Allow multiple TagHeaders with MailgunApiTransport #44137

merged 1 commit into from
Dec 11, 2021

Conversation

starred-gijs
Copy link
Contributor

@starred-gijs starred-gijs commented Nov 19, 2021

Q A
Branch? 6.1
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

Mailgun allows you to set 3 tags per message but the current implementation in MailgunApiTransport, any consecutive TagHeader will override the previous one. Because it uses FormDataPart to build the payload, by using a integer key, it allows to set multiple parts with the same name #38323
The MailgunHttpTransport already supports multiple TagHeaders and I added a test to prove that.

@carsonbot carsonbot added this to the 5.3 milestone Nov 19, 2021
@carsonbot carsonbot changed the title [Mailer][Mailgun] Allow multiple TagHeaders with MailgunApiTransport [Mailer] [Mailgun] Allow multiple TagHeaders with MailgunApiTransport Nov 19, 2021
@starred-gijs
Copy link
Contributor Author

Hi @kbond, you implemented the original version for Mailgun TagHeader support, are you the right person to ask for a review/feedback?

Copy link
Member

@kbond kbond left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the ping @starred-gijs! This looks good to me but let's add as a new feature so you'll need to target 6.1.

@starred-gijs
Copy link
Contributor Author

Thanks for your reply! Any change I can convince you to handle this as a bug? 😄
Main reason is that multiple TagHeader does work with the MailgunHttpTransport and this PR fixes it for MailgunApiTransport.

@kbond
Copy link
Member

kbond commented Dec 10, 2021

I admit this feels like a bit of a grey area personally and I know the frustration of having to wait a few versions for a fix like this. I'm falling back on the established Symfony process and this would be considered a feature. The code isn't currently broken, it just doesn't allow a specific feature provided by Mailgun.

@starred-gijs
Copy link
Contributor Author

Oke fair enough, it was worth a try. I will rebase and target 6.1 :)

@kbond
Copy link
Member

kbond commented Dec 10, 2021

Awesome, and thanks for understanding :)

Copy link
Contributor

@OskarStark OskarStark left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only one minor

@fabpot
Copy link
Member

fabpot commented Dec 11, 2021

Thank you @starred-gijs.

@fabpot fabpot merged commit 6dc2b06 into symfony:6.1 Dec 11, 2021
@starred-gijs
Copy link
Contributor Author

@OskarStark Thanks for the review!
Sorry did not read your comment in time to change it, its now already merged so I will leave it as is.

@OskarStark
Copy link
Contributor

No problem, thanks for reaching out

@fabpot
Copy link
Member

fabpot commented Dec 13, 2021

I've made the change myself while merging as it was a small one.

@starred-gijs starred-gijs deleted the mailgun-tag-headers branch February 9, 2022 12:22
@starred-gijs
Copy link
Contributor Author

starred-gijs commented Mar 1, 2022

I admit this feels like a bit of a grey area personally and I know the frustration of having to wait a few versions for a fix like this. I'm falling back on the established Symfony process and this would be considered a feature. The code isn't currently broken, it just doesn't allow a specific feature provided by Mailgun.

Not to disrespect anyone, but how is this PR different? #45274

edit: I mean the target branch :)

@kbond
Copy link
Member

kbond commented Mar 1, 2022

Not to disrespect anyone

None taken :)

but how is this PR different?

I chose #45274 as a bug fix because multiple tags were already implemented, tested, and documented for Mailchimp. The way they were added was not consistent.

@fabpot fabpot mentioned this pull request Apr 15, 2022
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.

6 participants