I'm hosting a site on Amazon's ec2 running a 64-bit version of CentOS.
The site has a simple Contact Us form that needs to send an email to several addresses when submitted (pretty basic).
Has anyone used Amazon's SES with Symfony2 and the Swiftmailer Bundle? And if so, do you recommend using SES or a more traditional email server for this type of task?
Sending mails through SES via Symfony2 didn't work out of the box for me because I had the spool option configured in my config.yml.
Another problem I stumbled upon was the port. Port 25 and 587 work perfect but 465 got me a timeout.
And it's important that you are using the right SMTP server, at first I was using us-east-1 (because I copied it from an example) although my SMTP actually was email-smtp.eu-west-1.amazonaws.com
So here's my current config:
parameters:
mailer_transport: smtp
mailer_host: email-smtp.eu-west-1.amazonaws.com
mailer_user: AWS_ACCESS_KEY
mailer_password: AWS_SECRET_KEY
mailer_encryption: tls
mailer_port: 587
swiftmailer:
transport: %mailer_transport%
host: %mailer_host%
username: %mailer_user%
password: %mailer_password%
encryption: "%mailer_encryption%"
port: %mailer_port%
auth_mode: login
I found the problem by executing the following on my command line:
php app/console swiftmailer:debug
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With