This repository has been archived on 2023-08-20. You can view files and clone it, but cannot push or open issues or pull requests.
symfony/src/Symfony/Component/Mailer
Fabien Potencier fd13f5f8e9 bug #37527 [Mailer] Fix reply-to functionality in the SendgridApiTransport (jt2k)
This PR was squashed before being merged into the 4.4 branch.

Discussion
----------

[Mailer] Fix reply-to functionality in the SendgridApiTransport

| Q             | A
| ------------- | ---
| Branch?       | 4.4
| Bug fix?      | yes
| New feature?  | no
| Deprecations? | no
| Tickets       |
| License       | MIT
| Doc PR        |

When sending a message using the `SendgridApiTransport`, the reply-to address was being ignored. In other transports, the reply to can be set using headers, but SendGrid requires that certain fields be added explicitly to the API payload. This is already handled for From, To, Cc, Bcc, and Subject, but was not handled for Reply-To. This change extracts the reply to address from the `Email` object and adds it to the payload.

Note that the `Email` object allows for multiple Reply-To addresses, but SendGrid only supports a single one, so I am just using the first element of the array.

I also fixed a link in a comment to SendGrid's documentation explaining the reserved headers that are not allowed.

Commits
-------

2cf25d1055 [Mailer] Fix reply-to functionality in the SendgridApiTransport
2020-07-15 14:22:44 +02:00
..
Bridge [Mailer] Fix reply-to functionality in the SendgridApiTransport 2020-07-15 14:22:36 +02:00
DataCollector Fix some \Throwable support remaining issues 2019-11-12 18:18:47 +01:00
Event [Mailer] Fix SmtpEnvelope renaming to Envelope 2019-09-15 10:37:41 +02:00
EventListener Fix From/Sender handling in Emails 2020-04-16 16:49:30 +02:00
Exception Allow \Throwable $previous everywhere 2019-11-12 15:51:11 +01:00
Messenger [Mailer] Remove an internal annot 2020-06-10 07:55:43 +02:00
Test [Mailer] Change the DSN semantics 2019-09-02 15:50:44 +02:00
Tests [Mime] Keep Sender full address when used by non-SMTP transports 2020-07-15 08:28:59 +02:00
Transport Merge branch '3.4' into 4.4 2020-05-30 22:06:45 +02:00
.gitattributes add missing gitattributes for phpunit-bridge 2020-03-27 17:54:36 +01:00
.gitignore Add gitignore file for Symfony 4.3 2019-09-17 11:54:03 +02:00
CHANGELOG.md [Mailer] Add UPGRADE entry about the null transport DSN 2019-11-14 15:24:33 +01:00
composer.json Use ">=" for the "php" requirement 2020-05-20 10:37:50 +02:00
DelayedEnvelope.php rename SmtpEnvelope to Envelope 2019-09-12 16:17:57 +02:00
Envelope.php [Mime] Keep Sender full address when used by non-SMTP transports 2020-07-15 08:28:59 +02:00
LICENSE Update year in license files 2020-01-01 12:51:43 +01:00
Mailer.php ensure legacy event dispatcher compatibility 2019-09-25 16:41:08 +02:00
MailerInterface.php rename SmtpEnvelope to Envelope 2019-09-12 16:17:57 +02:00
phpunit.xml.dist added the Mailer component 2019-03-30 09:09:06 +01:00
README.md Remove experimental notice from components 2019-07-11 11:03:49 +02:00
SentMessage.php Add Message-Id to SentMessage when sending an email 2019-10-12 10:43:49 +02:00
Transport.php [Mailer] Fixed generator bug when creating multiple transports using Transport::fromDsn 2020-06-09 10:20:50 +02:00

Mailer Component

The Mailer component helps sending emails.

Resources