Symfony 2 Swiftmailer + Amazon SES: Failed to authenticate on SMTP server with username “XXXXXXXXXXXXXXXX” using 2 possible authenticators


I know this question have been asked before but any of the given responses read have become into a solution for this scenario with Symfony2 + Swiftmailer + Amazon SES.

I setup Amazon SES account details for Swiftmailer in Symfony2, all the information is correct, user name and password. However by some weird reason I don’t catch up Symfony2 Swiftmailer drops me this error while sending the email.

This is what I got in config.yml

And parameters.yml

Placing a Gmail smtp details instead Amazon SES works just fine and sends email rightly. But with Amazon SES configuration it doesn’t. I repeat, user name is correct, it works with Amazon SES Mailer library, but does not do it with Symfony integrated Swiftmailer.

Some thoughts?


All your configuration parameters I think are just fine like in the Symfony2 documentation states

If with the Amazon SES Mailer library which is part of the AWS SDK it works, then check if you are using the right credentials for the SMTP solution with Swiftmailer in Symfony2.

When you use the AWS SDK you use the AWS access keys to access the SES API and be able to send email using the Amazon SES Mailer included in that SDK.

When you use another library like Swiftmailer you’ll be sending email via the Amazon SES SMTP interface it requires the SMTP credentials, not the AWS access keys.

This SMTP credentials are generated from the SMTP settings in the SES console and those are the right ones that should be used when using SMTP to send email with amazon SES.

Check this documentation

Leave a Reply