Closed
Description
I'm trying to use the EnvelopeListener to override the email used for sending in dev mode.
Unfortunately the SendgridApiTransport uses the original email and not the envelope to get the recipients, meaning it still send emails to the original recipient.
In https://github.com/symfony/sendgrid-mailer/blob/master/Transport/SendgridApiTransport.php#L86
the getPayload function uses
$personalization = [
'to' => array_map($addressStringifier, $email->getTo()),
'subject' => $email->getSubject(),
];
instead of something like the MandrillSmtpApi which uses a getRecipients function that uses the $envelope
https://github.com/symfony/mailchimp-mailer/blob/master/Transport/MandrillApiTransport.php#L82
Metadata
Metadata
Assignees
Labels
No labels