Facebook Pixel Image

Oby Reacts: How to Set Up WP Mail SMTP with Gmail (Fix Failed Emails For Good!)

Set up WP Mail SMTP with Gmail to fix failed emails for good! Optimize your WordPress email deliverability effortlessly and keep your messages out of spam.

💡 Did you know?

YacDaddy is an app for home service businesses that turns jobsite photos into cash with content engine marketing

With YacDaddy, you can post your work to your website, Google My Business, Facebook, and more for SEO and content marketing with the click of a button in our mobile app. If you are interested in marketing your home service business, download the free mobile app now 👇👇👇

Table of Contents

Addressing Email Deliverability Issues in WordPress

Email deliverability is a common challenge for WordPress users. Important emails often end up in spam folders or aren’t delivered at all. This can impact everything from user registrations to order confirmations, causing frustration for both site owners and visitors.

Why Emails Fail to Deliver from WordPress Sites

By default, WordPress uses the PHP mail function to send emails, which isn’t the most reliable method. Many email providers view these emails as suspicious because they lack proper authentication, leading to them being marked as spam or blocked entirely.

Improving Deliverability with WP Mail SMTP and Gmail

One effective solution is to configure your WordPress site to send emails using SMTP (Simple Mail Transfer Protocol) with Gmail. SMTP adds authentication to your emails, ensuring they are trusted by email providers. WP Mail SMTP is a plugin that simplifies this process, and when paired with Gmail’s SMTP server, it significantly enhances email deliverability.

Getting Started with WP Mail SMTP

First, install and activate the WP Mail SMTP plugin on your WordPress site. Once activated, navigate to the plugin’s settings to begin the configuration process.

Configuring the From Email and Name

In the WP Mail SMTP settings, you’ll find the “From Email” field. Enter the Gmail address you plan to use for sending emails. This ensures that all outgoing emails originate from this address. You can also enable the “Force From Email” option to apply this setting universally across your site.

Next, set the “From Name” field to the name you want recipients to see. This could be your site’s name or any other identifier. Enabling the “Force From Name” option ensures consistency in your outgoing emails.

Selecting Gmail as Your Mailer

Scroll down to the “Mailer” section and select “Google / Gmail.” This option allows your site to use Gmail’s SMTP server to send emails, providing the necessary authentication for better deliverability.

Setting Up a Google Cloud Project

To connect your site with Gmail’s SMTP server, you need to create credentials through the Google Cloud Platform. Open a new browser tab, log into your Google account, and navigate to the Google Cloud Console.

Once there, you’ll need to create a new project:

  1. Click on the project dropdown in the top navigation bar.
  2. Select “New Project.”
  3. Enter a project name and select your organization.
  4. Click “Create.”

Enabling the Gmail API

With your new project created, you need to enable the Gmail API:

  1. In the left sidebar, click on “APIs & Services” and then “Library.”
  2. In the search bar, type “Gmail API” and select it from the results.
  3. Click the “Enable” button.

Creating Credentials for OAuth Client ID

Now, you’ll create the credentials needed to connect your site to Gmail:

  1. Click on “Create Credentials.”
  2. For “Which API are you using?” select “Gmail API.”
  3. For “What data will you be accessing?” choose “User data.”
  4. Click “Next.”

Configuring the OAuth Consent Screen

You’ll be prompted to provide basic information about your app:

  • App Name: Enter a name for your app (e.g., “WP Mail SMTP Gmail Integration”).
  • User Support Email: Select your email address.
  • Developer Contact Information: Enter your email address.

Click “Save and Continue.”

Skipping Scopes and Proceeding

The next section asks about scopes, which define what access your app is requesting. For this setup, you can skip adding any scopes by clicking “Save and Continue.”

Setting Up Your OAuth Client ID

On the “OAuth Client ID” page:

  1. Under “Application Type,” select “Web Application.”
  2. Enter a name for your client.
  3. In the “Authorized Redirect URIs” section, you’ll need to add a URI.

Go back to the WP Mail SMTP settings page in your WordPress dashboard and copy the “Authorized Redirect URI” provided. Return to the Google Cloud Console and click “Add URI,” then paste the URI.

Click “Create” to finalize the setup.

Switching Your App to Production

By default, your app is in testing mode. To use it fully, you need to publish it:

  1. In the left sidebar, click on “OAuth Consent Screen.”
  2. Under “Publishing Status,” click “Publish App.”
  3. Confirm by clicking “Confirm.”

Obtaining Your Client ID and Client Secret

Navigate back to “Credentials” and select your OAuth 2.0 Client ID. Here, you’ll find your Client ID and Client Secret.

Copy the Client ID and paste it into the corresponding field in the WP Mail SMTP settings on your WordPress site. Repeat the process with the Client Secret.

Finalizing the Connection

After saving your settings in WP Mail SMTP, you’ll see a button labeled “Allow plugin to send emails using your Google account.” Click this button to authenticate the connection.

You may receive a warning that the app isn’t verified. This occurs because the app is only used internally. Click on “Advanced” and then proceed by clicking the link that allows you to continue.

Confirm the permissions to complete the authentication process.

Testing Your Email Configuration

To ensure everything is working correctly, send a test email:

  1. In WP Mail SMTP settings, go to the “Email Test” tab.
  2. Enter an email address where you can receive the test message.
  3. Click “Send Email.”

Check your inbox for the test email to confirm that your configuration is successful.

About WPForms and WP Mail SMTP

WP Mail SMTP is developed by the same team behind WPForms, a leading WordPress forms plugin with over 5 million active installations. Known for its user-friendly interface and powerful features, WPForms allows website owners to create custom forms without any coding knowledge.

The synergy between WPForms and WP Mail SMTP ensures that emails sent through forms on your site are delivered reliably, enhancing communication with your audience.

Additional Support and Resources

If you encounter any issues or have questions:

Wrapping Up

By setting up WP Mail SMTP with Gmail, you’ve taken a significant step toward resolving email deliverability issues on your WordPress site. Authenticating your emails through Gmail’s SMTP server ensures they reach your users’ inboxes reliably.

A Yak’s Perspective on Email Deliverability

Fixing email issues might seem daunting, but with the right tools, it’s smoother than a yak’s coat after grooming. This guide simplifies the process, making it accessible even for those new to WordPress. Happy emailing!

💡 Did you know?

YacDaddy is an app for home service businesses that turns jobsite photos into cash with content engine marketing

With YacDaddy, you can post your work to your website, Google My Business, Facebook, and more for SEO and content marketing with the click of a button in our mobile app. If you are interested in marketing your home service business, download the free mobile app now 👇👇👇

Wow... those are great reviews!
View More Posts

💡 Did you know?

YacDaddy is an app for home service businesses that turns jobsite photos into cash with content engine marketing

With YacDaddy, you can post your work to your website, Google My Business, Facebook, and more for SEO and content marketing with the click of a button in our mobile app. If you are interested in marketing your home service business, download the free mobile app now 👇👇👇