How To Resolve the “Could not connect to SMTP host” Error

If you’re using your host or a third-party as your sending method you might encounter the “Could not connect to SMTP host” error:

It can happen for several reasons:

  1. Your SMTP credentials are incorrect.
    Check your SMTP credentials with your email provider.

  2. Your host blocks the SMTP port you use.
    Contact your host to check if it’s blocked and open it if it was.

  3. If your SMTP server uses an invalid (or self-signed) certificate or your PHP has an invalid/missing certificate authority bundle, the secure connection will fail.
    Add a code snippet from the following document to see if it resolves the issue: TLS Encryption Does not Work

  4. The stream_select() function is disabled by your host.
    Contact your host to enable it.