Mail with WP Mail SMTP

When you send WordPress emails through Gmail, they are more likely to be delivered and won't end up in the spam folder. So, in this tutorial, we'll show you how to set up the WP Mail SMTP plugin, which is the Most Popular SMTP with your Gmail email address. This method takes a little longer to set up, but the extra security is worth it because you don't need to share your Google account password or generate an app password in your Google account
You can send WordPress emails using your free Gmail account. But to make sure your email gets to the right place, we suggest using paid G Suite. This makes it look like your emails are coming from your own domain name, giving them more credibility

Step 1: Install WP Mail SMTP

  • On the Admin Panel, go to Plugin > Add News to find the WP Mail SMTP plugin
  • Click Install and Activate it
WP Mail SMTP Plugin

Step 2: Configure the WP Mail SMTP

  • Go to WP Mail SMTP > Settings to enter your email name in the field
  • Typing your email address is sent from. For example, if you use the Gmail email provider, enter your email address in the From Email field
Your Email Address

Step 3: Choose the email provider to connect with

  • Choose your email provider from the list of mailers. Click the Google/Gmail options
  • You have to connect to Google API to get the Client ID and Client Secret before completing this step. Now we move to the next step to finish it.
Email Provider

Step 4: Connect to Google API

Google Cloud Platform
  • Create a New Project in Google Cloud
New Project in Google Cloud
  • Enter the Project Name to create a new project
Create name of project
  • Go to the API & Services > OAuth consent screen to register it
Oath Consent Screen
  • Choose the User Type to configure it. Select the External type
User Type
  • Edit app information in App Name and User Support Email fields
  • On the App Name field, enter the Mail SMTP, for example. And the User Support Email, choose your email to send from
App Information
  • Enter the Developer Contact Information field, you could enter the same email which is sent to the customer
  • Click Save and Continue to finish the OAuth Consent Screen step
  • Continue to save this configuration to the Scopes and Test Users steps and back to the Dashboard
  • Next, you need to Publish App of new project

Step 5: Create new credentials

  • On the Credentials on the left sidebar, go to the Create Credentials > OAuth Client ID
OAuth Client ID
  • Create a new OAuth Client ID, choose the Application Type to Web Application
  • Enter the Name of your OAuth Client
  • Copy this link ( )to the Authorized Redirect URLs fields
  • Finally, you will see a new OAuth Client is created, let's copy Your Client ID and Your Client Secret to the WP SMTP Settings
  • Paste them into the Client ID and Client Secret on the WordPress, and click to Save Settings
  • After completing it, you need to confirm authorization to your Google account, click to authorize it
  • Allow the WP SMTP Plugin to access your Google Account
  • Congratulation, you already start sending emails through Gmail

Step 6: Enable Gmail API

  • On the Google Cloud, go to the API & Service on the left sidebar, choose Library to search Gmail API, and enable it
  • You can view and manage the mailbox data by this API

Step 7: Test Email

  • You can send an email test to your mailbox, enter your email address to check it
  • Your test email is sent successfully