Skip to content

Commit f6f8284

Browse files
author
Pierre Gasté
committed
[Mailer] added ReplyTo option for PostmarkApiTransport
1 parent a9a939f commit f6f8284

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

Postmark/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ CHANGELOG
44
4.4.0
55
-----
66

7+
* added `ReplyTo` option
78
* [BC BREAK] Renamed and moved `Symfony\Component\Mailer\Bridge\Postmark\Http\Api\PostmarkTransport`
89
to `Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkApiTransport`, `Symfony\Component\Mailer\Bridge\Postmark\Smtp\PostmarkTransport`
910
to `Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkSmtpTransport`.

Postmark/Transport/PostmarkApiTransport.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ private function getPayload(Email $email, Envelope $envelope): array
6767
'To' => implode(',', $this->stringifyAddresses($this->getRecipients($email, $envelope))),
6868
'Cc' => implode(',', $this->stringifyAddresses($email->getCc())),
6969
'Bcc' => implode(',', $this->stringifyAddresses($email->getBcc())),
70+
'ReplyTo' => implode(',', $this->stringifyAddresses($email->getReplyTo())),
7071
'Subject' => $email->getSubject(),
7172
'TextBody' => $email->getTextBody(),
7273
'HtmlBody' => $email->getHtmlBody(),
7374
'Attachments' => $this->getAttachments($email),
7475
];
7576

76-
$headersToBypass = ['from', 'to', 'cc', 'bcc', 'subject', 'content-type', 'sender'];
77+
$headersToBypass = ['from', 'to', 'cc', 'bcc', 'subject', 'content-type', 'sender', 'reply-to'];
7778
foreach ($email->getHeaders()->all() as $name => $header) {
7879
if (\in_array($name, $headersToBypass, true)) {
7980
continue;

PostmarkApiTransport.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,13 +67,14 @@ private function getPayload(Email $email, Envelope $envelope): array
6767
'To' => implode(',', $this->stringifyAddresses($this->getRecipients($email, $envelope))),
6868
'Cc' => implode(',', $this->stringifyAddresses($email->getCc())),
6969
'Bcc' => implode(',', $this->stringifyAddresses($email->getBcc())),
70+
'ReplyTo' => implode(',', $this->stringifyAddresses($email->getReplyTo())),
7071
'Subject' => $email->getSubject(),
7172
'TextBody' => $email->getTextBody(),
7273
'HtmlBody' => $email->getHtmlBody(),
7374
'Attachments' => $this->getAttachments($email),
7475
];
7576

76-
$headersToBypass = ['from', 'to', 'cc', 'bcc', 'subject', 'content-type', 'sender'];
77+
$headersToBypass = ['from', 'to', 'cc', 'bcc', 'subject', 'content-type', 'sender', 'reply-to'];
7778
foreach ($email->getHeaders()->all() as $name => $header) {
7879
if (\in_array($name, $headersToBypass, true)) {
7980
continue;

0 commit comments

Comments
 (0)