How to set up WP Mail SMTP with TLS in WordPress

WP Mail SMTP is one of the most common WordPress plugins for sending emails. In this manual we will show you how to configure it with the TLS certificate.

Requirements to have WP Mail SMTP with TLS

-- You must have a Wordpress with the WP Mail SMTP plugin installed.

In case you have a hosting service with us, this plugin is installed by default:

If you want to install this plugin manually, you can follow this manual:

**⚠ This manual explains how to configure the plugin on port 25 ⚠ **

-- The other important point is to have a SSL/TLS certificate.

You can install the TLS certificate for free if you have a hosting service in SWPanel:

WP Mail SMTP configuration with TLS

We must go to our configuration file "wp-config.php" and edit it.

From SWPanel it can be done in the following way:

Service management -> File Manager -> wp-config.php -> Edit file

Once inside this file, we will look for the plugin definitions, and we will add the following:

  • SMTP Server: In our case "mail.swp.swmanuales.com" <- You will have to indicate your SMTP server.
  • Port: 587 <- We will define the port to use the TLS certificate.
  • Type of certificate: TLS. <- The type of certificate we want to use.

And save the changes to the file.

Finally, we will verify that it has been done correctly by accessing our WordPress management panel.

We will go to the plugin management section *"WP Mail SMTP" -> "Settings".

And verify that it has been configured correctly:

Generate test email

Once configured, we are going to check the correct functioning, generating a test email.

We will go again to the plugin management "WP Mail SMTP" -> "Tools" -> "Email test".

And it will show us the result of the email:


2024 SW Hosting. All rights reserved. The prices shown on the website do not include any applicable taxes.