Have you ever struggled sending emails with TYPO3?
Why not sending them with an external, established and highly professional 3rd party email provider?
TYPO3 has a not documented feature to send out mails easily with:
- Amazon SES (Simple Email Service)
Since version 10.0 TYPO3 is using the
symfony/mailer to send out emails. This allows us to use all Symfony 3rd party transport providers by using their DSN (Data Source Name).
Setting up TYPO3 with 3rd party email provider
Choose your favorite provider here:
Load the dependency to your TYPO3 project, eg.
composer require symfony/amazon-mailer
Until now it’s not possible to configure the dsn mail settings in the install tool, so edit your LocalConfiguration.php file directly.
... 'MAIL' => [ 'defaultMailFromAddress' => 'email@example.com', 'dsn' => 'ses+api://your-api-key:your-urlencoded-secret@default?region=your-aws-region', 'transport' => 'dsn', // this is necessary because of a small TYPO3 bug ], ...
With this dsn option you’re also able to use SMTP or sendmail. You’re also allowed to configure fallback providers, load balancing to different providers and more.
Checkout the Symfony documentation for all details: https://symfony.com/doc/current/mailer.html#using-a-3rd-party-transport
Use TYPO3 extension ses_mailer for AWS SES
For a more easy configuration I created a small extension which helps you to configure SES as mail provider in the TYPO3 backend.
Install it with composer:
composer require different-technology/ses-mailer
Navigate in the TYPO3 Backend to Settings / Extension Configuration and configure
Avoid AWS access keys
For security reasons try to avoid AWS access keys. For example if your server with your TYPO3 instance runs within AWS you can attach a role to the EC2 instance. If it’s not possible to avoid an access key rotate it regularly.
I contributed a patch for the TYPO3 core with streamlining this feature and add it to the install tool: