Add Email Support to WordPress

Introduction

Instructions to add email support to my WordPress site.

splash image of wordpress mail product

Instructions

Install WP Mail SMTP Plug-in

Install the WordPress Mail SMTP plug-in using the following steps:

  • Log onto your WordPress dashboard
  • Go to plug-ins and click Add Plugin
  • Search for WP Mail SMTP
  • Click on Install and then Activate

Configure WP Mail SMTP

Now it's time to configure the SMTP plug-in.

  • After you activate the plug-in, you’ll see a Welcome page to help you with the setup.
  • Click on Let’s Get Started
  • Choose your preferred SMTP Mailer. I picked Gmail for my experiment.
  • You might get a warning that Gmail mailer is only good for low volumes of emails.
  • Click Continue to proceed to configure Mailer Settings.
  • That page provides instructions on how to set up the Gmail mailer.

Set up Google Cloud Service

WordPress provides pretty good documentation on this part of the setup. You can find it here!

  • Open an new tab and navigate to Google Cloud Services.
  • Create a new project and then follow the instructions
  • Enable API for the project
  • Enable Gmail API
  • Create credentials
  • Select User Data API and Click Next
  • Configure OAuth Consent Screen
  • Then configure OAuth Client ID
  • Configure Authorized Redirect URIs. You can copy the Redirect URI from the WordPress Mail SMTP configuration page
  • Press Create
  • Download the configuration credentials json file. This file contains the Client ID and Client Secret that you need to complete the configuration on WordPress.
  • Be sure to change the Publishing Status to In Production

Complete the WP Mail SMTP Configuration

We're almost there. Go back to your WordPress SMTP configuration page.

  • Copy and paste the Client ID and Client Secret from the JSON file into the SMTP configuration page.
  • Save Settings.
  • You’ll be asked to authenticate on Google with the Gmail account.
  • You might get a warning during authentication. Deal with that as you see fit.

Send a Test Email

  • Navigate to the WP Mail SMTP > Tools > Email Test.
  • Click Send Email.
  • If configured properly, WordPress should declare success, and you should receive an email in a few seconds.

Send Reset Link to a User

This is actually a pretty good test to see if the email is working:

  • Add a new user with a valid email on WordPress.
  • WordPress will send an email to the user asking to set the password.
  • It will also send an email to the Admin(s) that a new user has been registered.

You can take this a little further by resetting the password for the user:

  • Get back into the user's profile.
  • Scroll to the bottom of the profile page.
  • Click on the button that says Send Reset Link.
  • The page will say that a A password reset link was emailed to Bob De Builder.
  • The user will receive an email request from WordPress to reset the password.
  • The Admin will also receive an email that the password for the user has been reset.