8000 [Sendgrid-mailer] SendgridApiTransport Mailer doesn't respect envelope recipients · Issue #37870 · symfony/symfony · GitHub
[go: up one dir, main page]

Skip to content

[Sendgrid-mailer] SendgridApiTransport Mailer doesn't respect envelope recipients #37870

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
arendjantetteroo opened this issue Aug 18, 2020 · 0 comments

Comments

@arendjantetteroo
Copy link
Contributor

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

arendjantetteroo added a commit to arendjantetteroo/symfony that referenced this issue Aug 18, 2020
Fixes symfony#37870

The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.
@fabpot fabpot closed this as completed Aug 18, 2020
arendjantetteroo added a commit to arendjantetteroo/symfony that referenced this issue Aug 18, 2020
Fixes symfony#37870

The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.
arendjantetteroo added a commit to arendjantetteroo/symfony that referenced this issue Aug 18, 2020
Fixes symfony#37870

The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.
fabpot added a commit that referenced this issue Aug 18, 2020
…Transport (arendjantetteroo)

This PR was merged into the 4.4 branch.

Discussion
----------

[Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport

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

Fixes #37870

The SendgridApiTransport was not using the envelope to get the
recipients, so overriding the recipients with the EnvelopeListener was
not working.

Commits
-------

c4e5131 [Sendgrid-Mailer] Fixed envelope recipients on sendgridApiTransport
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants
0