Hosting Tutorial & Guide

How to Send WordPress Emails via SMTP

updated on Mar 27, 2016
How to Send WordPress Emails via SMTP No matter you are starting out a small email marketing campaign or just sending emails from WordPress for site notifications, you need to avoid the mail function built in WordPress because of the poor stability. Many users have reported to have troubles sending or receiving emails from their WordPress sites. It's probable that you are in the same issue, too.

There are various reasons for the problems with WordPress mail function. In most cases, it's because the shared hosting providers have not configured the function properly on their servers, or they may have disabled the function to prevent abuse.

An effective solution to these problems is to send WordPress emails by using an SMTP server instead of the mail function. In this tutorial, we will introduce two simple methods: using the SMTP server of your web host, and using the Gmail SMTP server. Both are low-cost options, so you don't have to pay an expensive email service.

Send WordPress Emails with the SMTP Server of Your Web Host

Nowadays, most WordPress hosting providers support SMTP, and depending on the hosting package you buy, you can get a certain number of free email accounts. With these accounts, you are able to create professional business email addresses with your own domains, such as

To configure your WordPress site with your web host's SMTP server, there are two steps needed.

Create an email account

For the example below, we use cPanel to complete the entire process. As cPanel is the most popular control panel for Linux hosting, your hosting provider may adopt it, too. Even if you are using another control panel, the process should be similar.

Firstly, log into cPanel with the credentials getting from your hosting provider. Then find the "Email" section and click on "Email Accounts".

Email Accounts

Now you will get an email creation form which requires you to fill in some information like the email address, password and mailbox quota. These could be whatever you want. But as you are going to use this email account to send emails from WordPress, we suggest you name the account to be something like If you need some help regarding this step, read our tutorial about creating and managing email accounts.

Create a New Email Account

After getting the email account created, you also have to find out the SMTP Host and SMTP Port before you can configure the account in WordPress. Normally, the hosting provider's knowledgebase should include an article including the information you need, but in the case that you cannot find it, contact the support.

Configure SMTP in WordPress

You will need an SMTP plugin to do this. As there are many choices, we want to take WP Mail SMTP as an example because it is easy-to-use. The first thing you should do is to install the plugin. When the plugin is activated, go to Settings > Email to configure it.

On the new page, you will be faced with a number of options, and you should do the following things one by one.
  1. Enter the email account you created before in the "From Email".
  2. Enter a from name.
  3. Select SMTP for "Mailer" to make WordPress send emails via SMTP.
  4. Under "SMTP Options", change the value for "SMTP Host" and "SMTP Port" to be the information you got from the hosting provider.
  5. For "Encryption", check SSL encryption.
  6. The "Authentication" should be SMTP authentication.
  7. Fill in the username and password of the SMTP login.
  8. Save the changes.
Set up SMTP Server in WordPress

After the changes are saved, you can make use of the test function included in WP Mail SMTP to make sure the plugin is configured properly to send emails. If you cannot receive the test message, you have to check the settings again.

Test SMTP Settings

Send WordPress Emails with Gmail SMTP Server

Using Gmail SMTP server is also an economical option to fix the WordPress email issues. Assumed that you have already got a Gmail account, you can start by installing a plugin named Postman SMTP. For Gmail SMTP, this plugin works better than WP Mail SMTP because of the good support for OAuth 2.0.

After installing the plugin, visit Settings > Postman SMTP to get started with the plugin. Soon you will see a getting-start wizard which you can follow to set up the plugin easily.

There are altogether six steps included in the setup wizard, and you can start with the step 2 by filling in the sender details. Just enter your Gmail account and a from name.

Sender Details

For the next step, you don't have to deal with anything because the plugin will fill in Google SMTP server automatically.

Outgoing Mail Server

Next, the plugin runs a connectivity test automatically, and depending on the results it delivers, you can select the socket and authentication method. We'd recommend Gmail SMTP on port 587 and the password authentication. If you'd like to use OAuth 2.0, you will need to visit this page to create a client ID.

Connectivity Test

In step 5, enter the login credentials for your Gmail account.

SMTP Authentication

After clicking on the "Finish" button, you can send a test email to yourself to check whether everything is OK.

Run a Test


Both ways introduced above are easy-to-handle. Depending on your own needs, you can choose either one to apply. However, no matter which way you use, you have to pay attention to the limitations for the outgoing emails per hour/day. If you exceed the limits, your account would be suspended or terminated.

Due to this limitation, we don't suggest you send newsletters or run any email marketing campaign with the free Gmail account or from your web host. In such cases, a paid email service like MailChimp could be better.