Skip to content

[Mailer/AWS] Custom headers aren't transmitted #45168

@KDederichs

Description

@KDederichs

Symfony version(s) affected

5.4.2

Description

When trying to send a custom header towards AWS using the AsyncAws implementation custom headers aren't included.
This seems to be due to the usage of the Simple message format that doesn't seem to allow for custom headers:
https://docs.aws.amazon.com/ses/latest/APIReference-V2/API_SendEmail.html

Upon printing the Api request the headers are nowhere to be found either.

How to reproduce

Add a header to the mail via:
$message->getHeaders()->addTextHeader('x-test', 'test'));
and send it using the ses+api DSN

Possible Solution

There seems to be a Raw message format you can send that allows for custom headers so the package should probably use that.

Additional Context

No response

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