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

Appearance settings

Commit 0035d17

Browse filesBrowse files
committed
[Mailer] Revert changes for Mailgun HTTP transport type with custom "h:sender" header
1 parent 40df96f commit 0035d17
Copy full SHA for 0035d17

File tree

2 files changed

+2
-11
lines changed
Filter options

2 files changed

+2
-11
lines changed

‎src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Mailgun/Tests/Transport/MailgunHttpTransportTest.php
+2-10Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,6 @@ public function testSend()
6969
$this->assertStringContainsString('Subject: Hello!', $content);
7070
$this->assertStringContainsString('To: Saif Eddin <saif.gmati@symfony.com>', $content);
7171
$this->assertStringContainsString('From: Fabien <fabpot@symfony.com>', $content);
72-
$this->assertStringContainsString('Sender: Senior Fabien Eddin <fabpot@symfony.com>', $content);
73-
$this->assertStringContainsString('h:sender: "Senior Fabien Eddin" <fabpot@symfony.com>', $content);
7472
$this->assertStringContainsString('Hello There!', $content);
7573

7674
return new MockResponse(json_encode(['id' => 'foobar']), [
@@ -81,17 +79,11 @@ public function testSend()
8179
$transport->setPort(8984);
8280

8381
$mail = new Email();
84-
$toAddress = new Address('saif.gmati@symfony.com', 'Saif Eddin');
85-
$fromAddress = new Address('fabpot@symfony.com', 'Fabien');
86-
$senderAddress = new Address('fabpot@symfony.com', 'Senior Fabien Eddin');
8782
$mail->subject('Hello!')
88-
->to($toAddress)
89-
->from($fromAddress)
90-
->sender($senderAddress)
83+
->to(new Address('saif.gmati@symfony.com', 'Saif Eddin'))
84+
->from(new Address('fabpot@symfony.com', 'Fabien'))
9185
->text('Hello There!');
9286

93-
$mail->getHeaders()->addHeader('h:sender', $mail->getSender()->toString());
94-
9587
$message = $transport->send($mail);
9688

9789
$this->assertSame('foobar', $message->getMessageId());

‎src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunHttpTransport.php

Copy file name to clipboardExpand all lines: src/Symfony/Component/Mailer/Bridge/Mailgun/Transport/MailgunHttpTransport.php
-1Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ public function __toString(): string
5353
protected function doSendHttp(SentMessage $message): ResponseInterface
5454
{
5555
$body = new FormDataPart([
56-
'h:sender' => $message->getEnvelope()->getSender()->toString(),
5756
'to' => implode(',', $this->stringifyAddresses($message->getEnvelope()->getRecipients())),
5857
'message' => new DataPart($message->toString(), 'message.mime'),
5958
]);

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.