Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:4.4fromwulff:mailer/fix-mandrill-headers
Aug 21, 2020

Conversation

@wulff
Copy link
Contributor

QA
Branch?5.1
Bug fix?yes
New feature?no
Deprecations?no
LicenseMIT

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:

$email = (newEmail())    ->from('from@example.com')    ->to('to@example.com')    ->replyTo('replyto@example.com')    ->subject('subject')    ->text('text');$mailer->send($email);

The expected result is a payload which contains the following headers:

"headers": {    "reply-to": "replyto@example.com"}

But instead, thegetPayload() method produces these headers:

"headers": [    "reply-to: replyto@example.com"]

Additional context
Seehttps://mandrillapp.com/api/docs/messages.html.

dmaicher reacted with thumbs up emoji
@stofstof added this to the4.4 milestoneAug 20, 2020
@dmaicher
Copy link
Contributor

There is a test failure though:

Testing src/Symfony/Component/Mailer.......................................................E.......  63 / 237 ( 26%)............................................................... 126 / 237 ( 53%)............................................................... 189 / 237 ( 79%).SS...........S.........SS......................                237 / 237 (100%)Time: 1.32 seconds, Memory: 10.00 MBThere was 1 error:1) Symfony\Component\Mailer\Bridge\Mailchimp\Tests\Transport\MandrillApiTransportTest::testCustomHeaderUndefined offset: 0/home/travis/build/symfony/symfony/src/Symfony/Component/Mailer/Bridge/Mailchimp/Tests/Transport/MandrillApiTransportTest.php:68

@wulff
Copy link
ContributorAuthor

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.

Copy link
Contributor

@dmaicherdmaicher left a 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

@dmaicher
Copy link
Contributor

@wulff can you rebase this to 4.4? There the issue also exists, right?

@fabpot
Copy link
Member

Thank you@wulff.

@fabpotfabpot merged commit1f4c616 intosymfony:4.4Aug 21, 2020
}

$payload['message']['headers'][] =$name.':'.$header->getBodyAsString();
$payload['message']['headers'][$name] =$header->getBodyAsString();
Copy link
Member

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.

Copy link
ContributorAuthor

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.

This was referencedAug 31, 2020
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@fabpotfabpotfabpot left review comments

@stofstofstof approved these changes

@dunglasdunglasAwaiting requested review from dunglas

@jderussejderusseAwaiting requested review from jderusse

@lyrixxlyrixxAwaiting requested review from lyrixx

@srozesrozeAwaiting requested review from sroze

@xabbuhxabbuhAwaiting requested review from xabbuh

+1 more reviewer

@dmaicherdmaicherdmaicher approved these changes

Reviewers whose approvals may not affect merge requirements

Assignees

No one assigned

Projects

None yet

Milestone

4.4

Development

Successfully merging this pull request may close these issues.

5 participants

@wulff@dmaicher@fabpot@stof@carsonbot

[8]ページ先頭

©2009-2025 Movatter.jp