Send email Via amazon SES service failed due to ssl and tsl field

I try to send email via amazon SES service and it’s failed .
i made changes in Mailer.php and then it works fine . can we fix this in next release?

if ($this->Host === ‘’ || $this->Host === ‘’||$this->Host === ‘’ ||$this->Host === ‘’) {
if ($port == 465) $this->SMTPSecure = ‘ssl’;
if ($port == 587) $this->SMTPSecure = ‘tls’;

Hi pavan, thanks for suggesting this. I wonder how many other servers there are that might need this, particularly as you are referencing one AWS region.

@ross do you have any thoughts on how this might be achieved? Perhaps we switch to an array of hosts, and just match on the domain, rather than the subdomain. Thoughts?



@admin I wonder if rather than hard-coding the hosts used to determine which SMTPSecure value to use, we add it as an option in the SMTP settings. That way administrators can select the ssl or tls setting they need, defaulted to off. This may offer more flexibility than pre-loading a list of known hosts.

Sandra this sounds great. Is it something you’d be happy to implement? Thanks!

Sure, I’ve added it in the following PR:

Thank you for implementing suggestion