YaySMTP: Send Email Via SMTP In WordPress With Google Workspace and Two-Factor Authentication

I’m a huge proponent of Two-Factor Authentication (2FA) on every platform that I’m running. As a marketer that works with clients and client data, I simply can’t be too careful about security so the combination of different passwords for every site, using Apple Keychain as a password repository, and enabling 2FA on every service is a must.

If you’re running WordPress as your content management system, the system is typically configured to push email messages (like system messages, password reminders, etc.) through your host. However, this isn’t an advisable solution for a couple of reasons:

The solution, of course, is to install an SMTP plugin that sends your email out of your Google Workspace account instead of just being pushed from your server.

Want to set up Microsoft Instead? Click Here

YaySMTP WordPress Plugin

In our list of the best WordPress plugins, we list the YaySMTP plugin as a solution for connecting your WordPress site to an SMTP server to authenticate and send outgoing emails. It’s simple to use and even includes a dashboard of emails sent as well as a simple test button to ensure you’re authenticated and sending properly.

While it’s free, we switched our site and our clients’ sites over to this paid plugin because it had better reporting features and a ton of other integrations and email customization features in their suite of other plugins. With the other SMTP WordPress plugins, we continued to run into issues with authentication and SSL errors that we didn’t with the YaySMTP Plugin.

You can also set up YaySMTP for Sendgrid, Zoho, Mailgun, SendinBlue, Amazon SES, SMTP.com, Postmark, Mailjet, SendPulse, Pepipost, and more. And, the parent company YayCommerce, has fantastic plugins for customizing your WooCommerce emails.

WordPress SMTP Setup For Google

The settings for Google Workspace are pretty simple:

TIP: Don’t use your account password! Read below on setting up and App Password that won’t expire if you change your password or if you have two-factor authentication (2FA) set up.

Here’s how it looks (I’m not displaying the fields for username and password):

WordPress Google SMTP Settings with YaySMTP

Two-Factor Authentication

The problem is now authentication. If you have 2FA enabled on your Google account, you can’t just enter your username (email address) and password within the plugin. You’ll get an error when you test that tells you that you need 2FA to complete authenticating to Google’s service.

However, Google does have a solution for this… called App Passwords.

Google Workspace App Passwords

Google Workspace allows you to make application passwords that don’t require two-factor authentication. They’re basically a single-purpose style password that you might use with email clients or other third-party platforms… in this case your WordPress site.

To add a Workspace App Password:

  1. Login to your Google Account.
  2. Select Security.
  3. Enable Two-Factor Authentication.
  4. Under Signing in to Google, select App Passwords.
  5. Select Other, and write the name of your site and generate a password.

Google will enable a password and provide it to you so that you can use it to authenticate.

Paste the generated password Easy WP SMTP and it will authenticate properly.

Send a Test Email WIth The YaySMTP Plugin

Use the test button and you can instantly send a test email. Within the WordPress dashboard, you’ll see the widget that shows you that the email was successfully sent.

Now you can log in to your Google Mail account, go to the Sent folder, and see that your message was sent!

Download the YaySMTP Plugin

Disclosure: Martech Zone is an affiliate for YaySMTP and YayCommerce as well as a customer.

Appreciate this content?

Sign up for our weekly newsletter, which delivers our latest posts every Monday morning.

We don’t spam! Read our privacy policy for more info.

Check your inbox or spam folder to confirm your subscription.

Exit mobile version