Skip to content

[Mailer] Make sure you can pass custom headers to Mailgun #35162

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
Jan 4, 2020

Conversation

Nyholm
Copy link
Member

@Nyholm Nyholm commented Jan 1, 2020

Q A
Branch? 4.4
Bug fix? yes
New feature? no
Deprecations? no
Tickets fix #35095
License MIT
Doc PR

I can only assume that there was a mistake to use $header->toString() since it makes no sense to include the header name here. That is why this is a bugfix and not a new feature.

Without this fix my test will fail:

Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{"foo":"bar"}'
+'X-Mailgun-Variables: {"foo":"bar"}'

There are a few similar places for other mailer bridges that looks like they have similar issues. I dont know those providers very well. I can spend time researching them and confirm if there are bugs there too. But first I want to make sure a fix like this is accepted.

@fabpot
Copy link
Member

fabpot commented Jan 2, 2020

@Nyholm The fix seems indeed correct to me. The other providers are affected as well (see #35095 for instance on the same topic). If you can fix it for all providers in this PR, that would be great! Thank you.

@Nyholm
Copy link
Member Author

Nyholm commented Jan 2, 2020

Sure, I will.

Thank you for a quick reply

@nicolas-grekas nicolas-grekas added this to the 4.4 milestone Jan 4, 2020
@Nyholm Nyholm force-pushed the mailgun-custom-header branch from 54eafb2 to dcbb6c5 Compare January 4, 2020 11:54
@Nyholm
Copy link
Member Author

Nyholm commented Jan 4, 2020

I fixed other providers and rebased the PRs.

@fbourigault Could you review please?

@nicolas-grekas
Copy link
Member

Thank you @Nyholm.

nicolas-grekas added a commit that referenced this pull request Jan 4, 2020
…(Nyholm)

This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Mailer] Make sure you can pass custom headers to Mailgun

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       | fix #35095
| License       | MIT
| Doc PR        |

I can only assume that there was a mistake to use `$header->toString()` since it makes no sense to include the header name here. That is why this is a bugfix and not a new feature.

Without this fix my test will fail:
```
Failed asserting that two strings are equal.
--- Expected
+++ Actual
@@ @@
-'{"foo":"bar"}'
+'X-Mailgun-Variables: {"foo":"bar"}'
```

There are a few similar places for other mailer bridges that looks like they have similar issues. I dont know those providers very well. I can spend time researching them and confirm if there are bugs there too. But first I want to make sure a fix like this is accepted.

Commits
-------

43c1e77 [Mailer] Make sure you can pass custom headers to Mailgun
@nicolas-grekas nicolas-grekas merged commit 43c1e77 into symfony:4.4 Jan 4, 2020
@Nyholm
Copy link
Member Author

Nyholm commented Jan 4, 2020

Thank you for merging

@Nyholm Nyholm deleted the mailgun-custom-header branch January 4, 2020 13:22
This was referenced Jan 21, 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