WordPress Email Configuration

install wp mail smtp plugin

This article explains how to do WordPress Email Configuration for a fresh installation of WordPress running on a Digital Ocean machine.

This is a blog post in the series Installing and Configuring WordPress on Digital Ocean. We will set up our WordPress blog to send out email using our GMail account, obviously for this to work you will need an existing GMail account.

For WordPress installs using a hosting company this step isn’t necessary usually but since this is a custom install we will have to manually configure email.

Steps for WordPress Email Configuration

The tasks we need to do to successfully configure email are:

Install the WP Mail SMTP plugin

First install the WP Mail SMTP plugin.

install wp mail smtp plugin

Enable Less Secure Apps in your GMail account

We need to enable Less Secure Applications on the GMail settings. This is because in April 2014 Google announced that it would improve the sign-in security of its services and affect any application sending usernames and passwords to the company.

If you open the less secure apps page under security settings on your GMail account you will see that Less Secure Apps is disabled by default. We need to enable this feature to successfully send email from our WordPress blog.

enable less secure apps

Enter your gmail account details on the settings page. For gmail use the following:

Mailer: SMTP
SMTP Host: smtp.gmail.com
SMTP Port: 465
Encryption: SSL
Authentication: Yes
Username: your full gmail address
Password: your mail password

Now GMail should accept our username and password when we authenticate with the google SMTP server.

Send test email

Google blocked the message!

google blocks email

Ahhh! It didn’t work. Google is still not accepting our emails sent from our WordPress blog. In the next section we will fix this problem.

Deal with GMail blocking requests

google is suspicious

From Google Documentation:

As a security precaution, Google may prevent an application from accessing your account if it’s the first time we’ve seen this application sign in to your account, or if it’s attempting to sign in from a new location.

The solution to the problem can be found on this page:

my client isnt accepting username and password

Enable the unlock captcha by clicking on the link http://www.google.com/accounts/DisplayDisplayUnlockCaptcha

display unlock captcha

Resend test email

We now need to send an email request to our gmail account within the next ten minutes. Google will remember the application after it signs in, and will allow it to access your account in the future as long as it uses the correct password.

After resending our test email we should see:

email sent from wordpress



We have now successfully configured WordPress to send emails using our gmail account!

If you liked this article please share! You can comment about this article below.