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

Commit47ef3a9

Browse files
author
Clara van Miert
committed
[Mailer] Support Return-Path in SesApiAsyncAwsTransport
Enable sending `SendEmailRequest`s with a `Return-Path` configured in`SesApiAsyncAwsTransport`.
1 parent60ce71e commit47ef3a9

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

‎src/Symfony/Component/Mailer/Bridge/Amazon/Tests/Transport/SesApiAsyncAwsTransportTest.php‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ public function testSend()
6969
$this->assertSame('Hello There!',$content['Content']['Simple']['Body']['Text']['Data']);
7070
$this->assertSame('<b>Hello There!</b>',$content['Content']['Simple']['Body']['Html']['Data']);
7171
$this->assertSame(['replyto-1@example.com','replyto-2@example.com'],$content['ReplyToAddresses']);
72+
$this->assertSame('bounces@example.com',$content['FeedbackForwardingEmailAddress']);
7273

7374
$json ='{"MessageId": "foobar"}';
7475

@@ -85,7 +86,8 @@ public function testSend()
8586
->from(newAddress('fabpot@symfony.com','Fabien'))
8687
->text('Hello There!')
8788
->html('<b>Hello There!</b>')
88-
->replyTo(newAddress('replyto-1@example.com'),newAddress('replyto-2@example.com'));
89+
->replyTo(newAddress('replyto-1@example.com'),newAddress('replyto-2@example.com'))
90+
->returnPath(newAddress('bounces@example.com'));
8991

9092
$message =$transport->send($mail);
9193

‎src/Symfony/Component/Mailer/Bridge/Amazon/Transport/SesApiAsyncAwsTransport.php‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -89,6 +89,9 @@ protected function getRequest(SentMessage $message): SendEmailRequest
8989
if ($emails =$email->getReplyTo()) {
9090
$request['ReplyToAddresses'] =$this->stringifyAddresses($emails);
9191
}
92+
if ($email->getReturnPath()) {
93+
$request['FeedbackForwardingEmailAddress'] =$email->getReturnPath()->toString();
94+
}
9295

9396
returnnewSendEmailRequest($request);
9497
}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp