-
-
Notifications
You must be signed in to change notification settings - Fork 9.6k
[Mailer] Fixed mandrill api header structure #37900
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
There is a test failure though:
|
I have updated the relevant test case, but now the Travis test fails on an unrelated test: https://travis-ci.org/github/symfony/symfony/jobs/719745366#L7547. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the other test failures seem unrelated
@wulff can you rebase this to 4.4? There the issue also exists, right? |
60c4191
to
aeb4c5e
Compare
Thank you @wulff. |
@@ -111,7 +111,7 @@ private function getPayload(Email $email, Envelope $envelope): array | |||
continue; | |||
} | |||
|
|||
$payload['message']['headers'][] = $name.': '.$header->getBodyAsString(); | |||
$payload['message']['headers'][$name] = $header->getBodyAsString(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How does Mandrill handle several headers with the same name? Here you will only ever get the last one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As far as I can tell, Mandrill only allows one of each header in the headers field.
When using the Mandrill API transport, it is not possible to set a reply-to address.
How to reproduce
Create a new email and add a reply-to address:
The expected result is a payload which contains the following headers:
But instead, the
getPayload()
method produces these headers:Additional context
See https://mandrillapp.com/api/docs/messages.html.