How to configure WordPress to use SMTP for emails

Configuring WordPress to use SMTP (Simple Mail Transfer Protocol) for sending emails is a good practice to ensure reliable email delivery and avoid common email issues.

Updated April 4, 2024.

Time of reading: 2 min

Level of Difficulty: Intermediate

🦔 You can skip to a specific step if you have already done a thing or two from the list.

Table of Content

Why use SMTP to send emails?

By default, WordPress is configured to send out emails via PHPMail.
Using PHP mail() is not a recommended method for a number of reasons, primarily due to the fact that it does not authenticate itself when sending emails. SMTP helps prevent spam by verifying the sender’s account before delivering an email. This will greatly improve email deliverability which is quite important for any website.

Install and setup a WordPress SMTP plugin.

There are several SMTP plugins available for WordPress. One popular and free option is the “WP Mail SMTP” plugin.

Step 1: Install a SMTP Plugin

  1. Log in to your WordPress admin dashboard.
  2. Navigate to “Plugins” > “Add New.”
  3. Search for “WP Mail SMTP.”
  4. Install and activate the “WP Mail SMTP” plugin
    We also have a tutorial on how to install WordPress plugins: Click here for the tutorial

Once the plugin is activated, you need to configure it with your SMTP settings.

  1. In the WordPress admin dashboard, go to “Settings” > “Email” (or “WP Mail SMTP” depending on your WordPress version).

  2. You will see the settings page for the WP Mail SMTP plugin

From Email: Enter the email address you want to use as the sender.

From Name: Enter the name you want to associate with the sender.

Mailer: Choose “Other SMTP.”

Scroll down to the “SMTP Options” section

SMTP Host: Enter the hostname of your SMTP server. This information is provided by your email hosting provider. We recommend contacting your hosting provider for the correct SMTP credentials.

SMTP Port: Usually, the default SMTP port is 587 for TLS or 465 for SSL. Confirm this with your email hosting provider.

Encryption: Choose either “None,” “SSL,” or “TLS” based on your email provider’s requirements.

SMTP Authentication: Enable this option.

Username and Password: Enter the username and password for your SMTP account

Click on the “Save Settings” button to save your changes.

After saving the settings, it’s a good idea to test the configuration to ensure everything is working correctly. Navigate to the Tools option to test the setup.

By following these steps, you should have successfully configured WordPress to use SMTP for sending emails which will greatly improve your website deliverability.