The error indicates that you are using a server on PHP 5.6 or above and that the local SMTP of your hosting account has an issue with the domain certificate.

Changes to PHP 5.6 require a valid, correctly issued, and correctly set up SSL certificate.

Generally, a deeper check will show an error similar to the following:

Peer certificate CN='*' did not match expected CN=''

The Solution:

 Either use the server's Sendmail facility or to contact your web host and ask them to fix the certificate issue.

If your web host has a valid SSL certificate for the server root (the hostname of the server you are using), you may well be required to use a valid username and password along with the SMTP mailer. Something like:


... where:


... is the server hostname which the SSL certificate covers. Your web host should be able to advise you further.

IF your web host is 100% sure that there are no issues with the SSL certificate of the actual server hostname, let them know that the problem could also be due to:

• Your web host blocking the ports needed to access your SMTP provider from your server; and/or

• You have the wrong username and password to connect to your SMTP provider

Your server logs should also indicate where the problem in the server is.

Helpful resource: