Call Us! 1-800-383-5193
Call Us! 1-800-383-5193

Need Help?

Our experts will login to your server within 30 minutes to fix urgent issues.

We will keep your servers stable, secure and fast at all times for one fixed price.

How to fix email error ‘SMTP connect() failed’ in WordPress sites

How to fix email error ‘SMTP connect() failed’ in WordPress sites

WordPress is the most widely used CMS for websites. Sending out mails from WordPress is required in scenarios such as contact form submissions or password resets.

‘SMTP connect() failed‘ is a commonly encountered error in WordPress, due to which emails fail to be send from your WordPress site.

Configuring email settings in WordPress

By Default, WordPress uses the PHP Mail function to send emails. But using PHP mail function is a less secure method and makes the server vulnerable to spamming.

As a result, many webservers have PHP mail() function disabled for security purposes. In those servers, mails can be send from WordPress using SMTP.

SMTP uses proper authentication and is therefore more secure. There are WordPress plugins such as ‘WP Mail SMTP‘, that has to be configured to send mails via SMTP.

Once the SMTP plugin is activated, a new ‘Email‘ menu will show up under the Settings in WP. You can configure the email delivery settings in that option.


Configure SMTP plugin in WordPress

Configure SMTP plugin in WordPress

You can give your email address, password, mail server name and port in the Email settings and save it. You can test the mail delivery to see if the settings are fine.

The following settings can be configured in the Email settings:

From Email - the email address you want to send emails from 
From Name - the name that your emails will be received from
Mailer - you can choose between the default PHP Mail function and SMTP
SMTP Host - the hostname for your SMTP server
SMTP Port - the port for your mail server, usually 25
Encryption - if you want to enable SSL/TLS encryption for the mail server
Authentication - check it for mail server authentication
Username - the username for your SMTP server
Password - the password for your SMTP server

What causes error ‘SMTP connect() failed’ in WordPress

The default mailer is PHPMailer in WordPress and many sites use it to send mails. But it can give ‘SMTP connect() failed’ error if PHPMailer is unable to contact the SMTP server.


SMTP connect() failed error in WordPress

SMTP connect() failed error in WordPress


Also, if the settings for the SMTP server is not configured correctly, it will not send mails successfully from the server and give ‘SMTP connect() failed’ error.

The error ‘SMTP connect() failed’ can be caused due to the many reasons, which we’ll discuss one by one.

Wrong username and password given in SMTP authentication.

SMTP port blocked in mail server firewalls.

SSL/TLS not support in mail server and encryption is enabled in WP setting.

Security restrictions by 3rd party servers such as gmail or email apps.

Upgrades to WordPress plugin or PHPMailer versions that have enhanced security features or bugs.

Get an EXPERT consultation

Do you spend all day answering technical support queries?

Wish you had more time to focus on your business? Let us help you.

We free up your time by taking care of your customers and servers. Our engineers monitor your servers 24/7, and support your customers over help desk, live chat and phone.

Talk to our technical support specialist today to know how we can keep your service top notch!


Server Management


  1. what if we only use php code without plugin wordpress? it is still possible to smtp connect? please help

    • Venator,

      It is possible to send mails via smtp function using PHP scripts too. Please submit your details at and we would help you configure the mail delivery settings of your PHP script.

  2. I face the same issue, the mail is not send. What i have to do,

  3. Facing the same issue. Emails were working as they should be.
    I have uploaded a ssl certificate to my webpage and email aren’t sent neither to customer nor to me. But in my local machine everything works okay.


Submit a Comment

Your email address will not be published. Required fields are marked *