Skip to content

Commit

Permalink
[Mailer] added ReplyTo option for PostmarkApiTransport
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Gasté committed Oct 7, 2019
1 parent b43f255 commit d49a738
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions src/Symfony/Component/Mailer/Bridge/Postmark/CHANGELOG.md
Expand Up @@ -4,6 +4,7 @@ CHANGELOG
4.4.0
-----

* added `ReplyTo` option
* [BC BREAK] Renamed and moved `Symfony\Component\Mailer\Bridge\Postmark\Http\Api\PostmarkTransport`
to `Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkApiTransport`, `Symfony\Component\Mailer\Bridge\Postmark\Smtp\PostmarkTransport`
to `Symfony\Component\Mailer\Bridge\Postmark\Transport\PostmarkSmtpTransport`.
Expand Down
Expand Up @@ -67,13 +67,14 @@ private function getPayload(Email $email, Envelope $envelope): array
'To' => implode(',', $this->stringifyAddresses($this->getRecipients($email, $envelope))),
'Cc' => implode(',', $this->stringifyAddresses($email->getCc())),
'Bcc' => implode(',', $this->stringifyAddresses($email->getBcc())),
'ReplyTo' => implode(',', $this->stringifyAddresses($email->getReplyTo())),
'Subject' => $email->getSubject(),
'TextBody' => $email->getTextBody(),
'HtmlBody' => $email->getHtmlBody(),
'Attachments' => $this->getAttachments($email),
];

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

0 comments on commit d49a738

Please sign in to comment.