In app/bundles/EmailBundle/Swiftmailer/Transport/AmazonTransport.php on line 33 the following change must be made in order to make the connection successful:
From
Code:
parent::__construct($host, 2587, 'tls');
TO:
Code:
parent::__construct($host, 587, 'tls');
aws works on these ports 25, 465 or 587
Before making the change I was getting this error in in the Configuration/Email Settings/Mail Send Settings
Code:
Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection refused #111] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport !! Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection refused #111] (code: 0)
++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport
Please make this change in the next release.
Thanks!
P.S.
I'd be glad to commit to the repository myself if someone points me how to do it
In app/bundles/EmailBundle/Swiftmailer/Transport/AmazonTransport.php on line 33 the following change must be made in order to make the connection successful:
From
parent::__construct($host, 2587, 'tls');
TO:
parent::__construct($host, 587, 'tls');
aws works on these ports 25, 465 or 587
Before making the change I was getting this error in in the Configuration/Email Settings/Mail Send Settings
Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection refused #111] Log data: ++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport !! Connection could not be established with host email-smtp.us-west-2.amazonaws.com [Connection refused #111] (code: 0)
++ Starting MauticEmailBundleSwiftmailerTransportAmazonTransport
Please make this change in the next release.
Thanks!
P.S.
I’d be glad to commit to the repository myself if someone points me how to do it
One thing we learned though the Mautic/Amazon SES setup journey is your DNS records must be absolutely correct per Amazon SES or SES won’t connect with Mautic. Correct means Amazon likes your DNS records, not that your DNS records tested fine using a typical smtp configuration prior to using SES.
We included the Mail From Domain settings and that process challenged us the most with DNS records. Carefully review your MX records as a slight change was needed in our MX records which wasn’t obvious. That issue kept us from getting the Mail From Domain to validate for some time. Once we got the Mail from Domain validated plus the 587 port change you advised we were able to get Success for Mautic and Amazon SES to connect.
No doubt changing the port to 587 was also a critical part of this. Mautic should give you a drop down of ports from which to select for the outbound smtp Amazon SES setting. We’re using release Mautic 2.10.
You can easily test what ports are open by using tools like https://mytoolbox.com and that assumes your host isn’t blocking such tools. We have our own dedicated servers so It’s much easier to scan and report on open ports.
Question guys you don’t need to modify any file in Mautic to work with Amazon SES, AWS. Mautic by default will work with Amazon.
But if you use a shared hosting and the hosting company block the ports used by Amazon you need to contact your hosting provider and ask them to open the ports you need.