Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

[Mailer] AWS SES API Transport not always using envelope #35037

Copy link
Copy link
Closed
@cfoehrdes

Description

@cfoehrdes
Issue body actions

Symfony version(s) affected: 4.4/5.0

Description

The AWS SES API transport implementation for Mailer is not using the recipients set on the envelope in all cases. If an email has attachments the envelope is entirely ignored and the message send in its raw form. In every other case "to" destination is set from the envelope but cc and bcc is still read from the email headers.

How to reproduce

Configure the Mailer with AWS API transport (ses+api://AWS_ACCESS_KEY_ID: AWS_SECRET_ACCESS_KEY@default), override the recipients via EnvelopeListener according to the sf docs and send an email with attachment (envelope ignored) or a cc/bcc (to gets rewritten but cc/bcc is still delivered).

Possible Solution

Use the AWS SES SendRawEmail endpoint in any case and set the API parameter Destinations to override an emails recipient in case the envelop recipient are different from the emails header recipients.

Additional context

For us this is kind of critical because we use redirection in a staging environment where the customer is expecting all emails to be redirected while testing his software. We are currently using our own AWS Mailer transport based on the AWS SDK and implemented the mentioned fix and redirects are done reliable. I would be happy to provide a PR with an implementation for the Symfony provided transport.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.