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 === 'smtp.gmail.com' || $this->Host === 'smtp-relay.gmail.com'||$this->Host === 'mars.dnsracks.com' ||$this->Host === 'email-smtp.us-east-1.amazonaws.com') {
if ($port == 465) $this->SMTPSecure = 'ssl';
if ($port == 587) $this->SMTPSecure = 'tls';
}

Comments

  • 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.

    @sandra 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?

    Thanks,

    Ross
  • @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.
    admin
  • Sandra this sounds great. Is it something you'd be happy to implement? Thanks!
  • Sure, I've added it in the following PR: https://github.com/GibbonEdu/core/pull/795
Sign In or Register to comment.