Skip to content

[Mailer] AWS SES auth with SESSION_TOKEN support #40193

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
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -65,11 +65,16 @@ public function create(Dsn $dsn): TransportInterface
case 'ses':
case 'ses+https':
$class = $class ?? SesHttpAsyncAwsTransport::class;

$sessionToken = $dsn->getOption('sessionToken');

$options = [
'region' => $dsn->getOption('region') ?: 'eu-west-1',
'accessKeyId' => $dsn->getUser(),
'accessKeySecret' => $dsn->getPassword(),
] + (
$sessionToken ? ['sessionToken' => $sessionToken] : []
) + (
'default' === $dsn->getHost() ? [] : ['endpoint' => 'https://'.$dsn->getHost().($dsn->getPort() ? ':'.$dsn->getPort() : '')]
);

Expand Down
1 change: 1 addition & 0 deletions src/Symfony/Component/Mailer/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ CHANGELOG
---

* added the `mailer` monolog channel and set it on all transport definitions
* Add support for `SESSION_TOKEN` for Async AWS Mailer transport
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

this is not totally accurate. this PR does not add support for the end variable SESSION_TOKEN, but adds a new option in DSN.


5.2.0
-----
Expand Down