Next-Level Code. Nexuvibe Style ...

Hrs
Min
Sec
Gmail & Google Workspace SMTP Setup Guide

How to Set Up Free Gmail & Google Workspace
SMTP in WordPress (Step-by-Step 2026)

Gmail is one of the most trusted email providers on the planet. Routing your WordPress emails through it takes less than 20 minutes and permanently solves delivery and spam problems. This guide shows you every step, including the part most tutorials get wrong.

14 min read
Updated 2026
Step-by-Step Tutorial
How to set up Gmail and Google Workspace SMTP in WordPress – step by step guide to configuring Gmail SMTP with app password and Nexu Mail SMTP plugin for reliable WordPress email delivery in 2026

Gmail and Google Workspace sit on some of the most trusted email infrastructure in the world. When Gmail sends an email on your behalf, it arrives with Google’s full authentication credentials. SPF records pointing to Google’s servers, DKIM signatures verified against Google’s published keys, and an IP reputation built on billions of legitimate daily sends. Spam filters at every major receiving mail server treat Gmail-sent messages with a baseline level of trust that no web server can replicate.

Connecting your WordPress site to Gmail’s SMTP servers is one of the most effective things you can do to improve email deliverability. It is also free, you do not need a Google Workspace subscription to use Gmail’s SMTP, though Workspace offers advantages for professional use that we will cover. The entire setup takes under twenty minutes once you know exactly what to do.

The challenge is that most tutorials about Gmail SMTP for WordPress are incomplete or outdated. The step that trips up the vast majority of people, generating a Gmail App Password rather than using a regular password, is often mentioned only briefly, without explaining why it is necessary or exactly where to find it in Google’s account settings, which have changed significantly over the past few years. This guide covers that step in full detail, along with every other part of the setup from start to first confirmed delivered email.

We cover both free Gmail accounts and Google Workspace (formerly G Suite) accounts, noting where the process differs. We also cover what to do after the initial setup to verify that email is actually reaching your recipients, because configuring SMTP and confirming it is working are two different steps that most guides treat as one.

What this guide covers
Free Gmail vs. Google Workspace SMTP. which one you should use and why.
Step-by-step: enabling 2FA and generating a Gmail App Password, the step most guides rush past.
Configuring Gmail SMTP inside WordPress using Nexu Mail SMTP. with the exact settings to enter.
Google Workspace SMTP setup: what is different and what you need to check in your Workspace admin.
How to confirm Gmail SMTP is working, using the email log to verify real delivery.
Gmail SMTP sending limits and when to upgrade to a transactional email provider.
Common errors and how to fix them: “Authentication failed”, “Connection timeout”, and “Less secure app” warnings.

Free Gmail vs. Google Workspace: which should you use?

Before starting the setup, it is worth understanding what you are choosing between and what the practical differences are. The SMTP configuration steps are nearly identical, the important differences are in sending limits, deliverability, and the professional impression your emails make.

Free Gmail (@gmail.com)
Completely free
Works immediately with any Gmail account
500 emails/day sending limit
Emails come from @gmail.com address
Less professional for business use
May show “sent via gmail.com” in some clients

Best for: personal sites, blogs, low-volume stores

Recommended for business
Google Workspace (@yourdomain.com)
Emails come from your own domain address
2,000 emails/day sending limit
Professional appearance for WooCommerce stores
Better alignment with your domain’s SPF/DKIM records
No “via gmail.com” mismatch in email headers
Starts at ~$6/user/month

Best for: businesses, WooCommerce stores, professional sites

Important: sending limits are per Google account, not per WordPress site
Gmail’s 500/day and Google Workspace’s 2,000/day limits apply to all email sent from that Google account across all methods. Gmail web, mobile app, SMTP, and any other client. If you use your business Gmail account for both regular correspondence and WordPress transactional email, those sends count toward the same daily limit. For high-volume WooCommerce stores, a dedicated transactional email provider like SendGrid or Mailgun is a better long-term choice, but for most sites, Gmail’s limits are more than adequate.

Before you begin: what you need

A Gmail or Workspace account

The account you will be sending WordPress emails from. Use a dedicated account if possible rather than your primary personal Gmail.

Two-factor authentication (2FA) enabled

App Passwords require 2FA to be active on your Google account. If you have not set this up, it takes under five minutes.

An SMTP plugin installed

We use Nexu Mail SMTP in this guide. Install and activate it from your WordPress dashboard before starting.

🔗While Gmail SMTP offers reliable delivery, a Nexu Mail SMTP plugin comparison reveals additional features like built-in email logging and fallback servers for WordPress sites. →

Part 1: Generating a Gmail App Password

This is the step that causes more failed Gmail SMTP setups than any other. Google stopped allowing regular Gmail passwords for SMTP authentication years ago as a security measure. If you try to connect WordPress to Gmail using your normal password, you will get an authentication error regardless of how correctly you enter the other settings. You must use an App Password, a special 16-character password generated specifically for third-party app access.

What an App Password is and why it is more secure
An App Password is a unique credential that grants access to your Google account through a specific application without exposing your main password. It can be revoked independently, if your WordPress site is ever compromised, you revoke the App Password without changing your main Google account password, immediately cutting off access without disrupting your other Google services. This is significantly more secure than using your primary password for SMTP authentication.
1
Sign in to your Google Account and go to Security settings

Go to myaccount.google.com and click on Security in the left-hand navigation. You need to be signed in to the specific Gmail or Google Workspace account you intend to use for WordPress SMTP, not just any Google account. If you manage multiple Google accounts, confirm which one is active before proceeding.

2
Enable two-factor authentication if not already active

In the Security section, look for How you sign in to Google and find 2-Step Verification. If it shows as Off, click it and follow the setup wizard. Google will ask you to confirm your phone number and choose a second factor, the Google prompt to your phone is the easiest option. Complete the 2FA setup before proceeding. App Passwords will not appear in your account settings until 2FA is active.

3
Navigate to App Passwords

With 2FA active, go directly to myaccount.google.com/apppasswords. If you cannot find this page through the Security menu, searching “App Passwords” in Google’s account search bar will bring you there. Note: if this page shows an error saying App Passwords are not available for your account, this typically means either 2FA is not fully activated yet, or (for Google Workspace accounts) App Passwords have been disabled by your Workspace administrator, in which case, see the Workspace section below.

4
Create a new App Password for WordPress

On the App Passwords page, you will see a text field with a prompt to name your app. Type WordPress SMTP (or any name that helps you identify it later) and click Create. Google will generate a 16-character password displayed in a yellow box. Copy this password immediately. Google will never show it to you again after you close this window. Do not add spaces when pasting it into your SMTP configuration, even though Google displays it with spaces for readability. The actual password is the 16 characters without spaces.

Save this information before moving on
Your Gmail or Google Workspace email address
Your 16-character App Password (without spaces)
SMTP Host: smtp.gmail.com
Port: 587 (TLS) or 465 (SSL)
Encryption: TLS (recommended) or SSL

Part 2: Configuring Gmail SMTP inside WordPress

With your App Password ready, the WordPress configuration is straightforward. Open your WordPress dashboard and navigate to the Nexu Mail SMTP settings panel. The settings you need to enter are specific and order matters, entering an incorrect port or encryption combination will cause a connection failure even with correct credentials.


Nexu Mail SMTP settings panel showing Gmail SMTP configuration fields – SMTP host port encryption username and password fields for connecting WordPress to Gmail for reliable email delivery

The SMTP settings panel in Nexu Mail SMTP – WordPress Gmail SMTP plugin with email log. enter your Gmail credentials here to permanently fix WordPress email delivery.
Setting field
Value to enter
Notes

SMTP Host
smtp.gmail.com
Same for both Gmail and Workspace

SMTP Port
587
Use 465 if 587 does not connect

Encryption
TLS / STARTTLS
Select SSL if using port 465

Authentication
Yes / Enabled
Must be enabled. Gmail requires auth

Username
Your full Gmail address

Password
Your 16-character App Password
NOT your regular Gmail password

From Name
Your business or site name
What recipients see as the sender name

From Email
Must match the SMTP username exactly

After entering these settings, save them. The From Email address must match your Gmail username exactly, if these two values do not match, Gmail will override the From address anyway, potentially causing display issues in some email clients. For Google Workspace users, the From Email should be your Workspace email address (e.g., [email protected]), which is the professional setup that aligns sending address with your domain’s DNS records.

Part 3: Google Workspace SMTP. what is different

If you are using Google Workspace rather than a free Gmail account, the SMTP settings themselves are identical (smtp.gmail.com, port 587, TLS). The differences are in the account setup and a few Workspace-specific considerations that can block the connection if not addressed.

App Passwords in Google Workspace require admin enablement

In Google Workspace, App Passwords are controlled at the admin level. If the App Passwords page gives you an error, your Workspace administrator has disabled this feature. The admin needs to go to Google Admin Console > Security > Authentication > 2-step verification and ensure “Allow users to turn on 2-step verification” is enabled, and that App Passwords are not blocked. If you are the Workspace admin, check these settings before assuming the feature is broken.

🔗Using Gmail’s infrastructure to send WordPress emails requires you to properly configure WordPress SMTP plugins for seamless authentication and delivery. →

The From address advantage with Google Workspace

With Google Workspace, your From email address can be [email protected] or [email protected] rather than a @gmail.com address. This aligns perfectly with your domain’s DNS records and eliminates the “via gmail.com” notation that sometimes appears in email headers when sending from a free Gmail account with a domain mismatch. For WooCommerce stores, receiving an order confirmation from [email protected] is significantly more professional and trustworthy than from a @gmail.com address.

DKIM signing with Google Workspace

Google Workspace allows you to configure DKIM signing for your own domain, which is a significant deliverability improvement over free Gmail. In the Google Admin Console, go to Apps > Google Workspace > Gmail > Authenticate email, generate a DKIM key, and add the provided TXT record to your domain’s DNS. Once propagated (up to 48 hours), every email your WordPress site sends through Workspace SMTP will carry a DKIM signature authenticated against your own domain, not Google’s. This is the configuration that maximizes deliverability for a business WordPress site.

🔗To fully secure your messages, you’ll need to configure WordPress email authentication records like SPF, DKIM, and DMARC alongside Gmail’s SMTP setup. →

Part 4: Verifying Gmail SMTP is actually working

Saving the SMTP settings is not the same as confirming email is working. Most guides treat these as the same step. They are not. You need to actively verify that emails are being delivered before assuming the configuration is correct.

Step 1: Use the built-in test email function

In Nexu Mail SMTP, use the Send Test Email function and send a test to an email address you control. Check that it arrives in the inbox (not spam) within a few minutes. If you receive it, the basic SMTP connection is working. If you do not receive it within five minutes, check your spam folder, then check the email log for an error entry that will tell you exactly what went wrong.

Step 2: Check the email log for the test entry

Open the email log in Nexu Mail SMTP and confirm that the test email appears with a successful delivery status. A log entry with a success status and a timestamp means the email was accepted by Gmail’s servers. This is the first concrete evidence that your configuration is correct and the pipeline is working.

Step 3: Run a full deliverability test

Go to mail-tester.com, copy the unique email address provided, and send a test email from your WordPress site to that address using the SMTP plugin’s test function. Mail Tester will analyze the email and give you a score out of 10 covering SPF, DKIM, content quality, blacklist status, and more. A score of 9 or 10 means your Gmail SMTP setup is delivering with excellent inbox placement. Note any specific issues flagged and address them.

Step 4 (WooCommerce): Place a test order and trace it through the log

If you are running WooCommerce, do not stop at the generic test email. Enable the Cheque Payment gateway temporarily, place a test order, and check the email log for the Order Processing notification. Confirm it arrived in the customer email’s inbox. This tests the complete WooCommerce email pipeline, not just the SMTP connection, and ensures that order-triggered emails are working correctly through your new Gmail SMTP configuration.


Nexu Mail SMTP email log showing Gmail SMTP delivery confirmation – verify Gmail SMTP is working in WordPress by checking email log delivery status after configuration

Email log in Nexu Mail SMTP – WordPress Gmail SMTP delivery confirmation and email tracking log. confirm every test email and production email is reaching its destination.

Troubleshooting: fixing the most common Gmail SMTP errors

Even with the correct settings, a small number of configurations run into specific errors. These are the most common ones and exactly how to resolve each one.

Error: “Authentication failed” or “Invalid credentials”
Most common error, almost always the same cause

This error means you entered a regular Gmail password instead of an App Password, or you entered the App Password with spaces (Google displays it as four groups of four characters separated by spaces, but the actual password has no spaces). Go back to myaccount.google.com/apppasswords, generate a new App Password, copy it carefully without the spaces, and re-enter it in the SMTP configuration. If 2FA is not enabled on your Google account, this error will also appear, enable 2FA first, then generate the App Password.

Error: “Connection timeout” or “Could not connect to SMTP host”
Usually a port or firewall issue

A connection timeout means your web server cannot reach Gmail’s SMTP server on the specified port. Some hosting providers block outbound connections on port 587. Try switching to port 465 with SSL encryption. If both ports fail, contact your hosting provider and ask whether outbound SMTP connections are blocked and which ports are permitted. Managed hosting providers like WP Engine and Kinsta block outbound SMTP specifically to prevent abuse, they recommend using a transactional email service like SendGrid instead.

Emails sent but arriving with “via gmail.com” in headers
Domain mismatch, cosmetic but worth fixing

This appears in some email clients when the From Email domain does not match the sending SMTP domain. If you are using free Gmail and sending from [email protected] through Gmail’s SMTP, recipients using certain clients may see “sent via gmail.com” in the email headers. The clean solution is Google Workspace, which allows you to send as [email protected] through Gmail’s servers without this mismatch. Alternatively, update your From Email to match your @gmail.com address to eliminate the notation entirely.

Emails stopping after a certain volume each day
Sending limit reached

If emails work normally until a certain point in the day and then stop, you have hit Gmail’s sending limit (500/day for free Gmail, 2,000/day for Google Workspace). The limit resets at midnight Pacific time. If you are consistently hitting this limit, it is a sign that your site’s email volume has outgrown Gmail SMTP. At this point, moving to a transactional email provider. SendGrid, Mailgun, or Amazon SES. is the right decision. These services are designed for high-volume transactional sending and have sending limits measured in tens of thousands per day at very low cost.

🔗If your WordPress site relies on forms, learning how to troubleshoot Contact Form 7 email delivery ensures submissions reach your inbox without delays. →

When Gmail SMTP is no longer the right solution

Gmail SMTP is an excellent solution for most WordPress sites, but it has architectural limits that make it the wrong choice for specific situations. Knowing when to move on saves significant operational headaches later.

Stay with Gmail SMTP when…
Under 200 emails/day typical volume
Simple blog, brochure, or small store
Google Workspace already in use for business email
No need for advanced delivery analytics

Upgrade to transactional email when…
Regularly sending 500+ emails/day
Running a high-volume WooCommerce store
Needing bounce management and delivery analytics
Your host blocks outbound Gmail SMTP ports

Gmail SMTP takes WordPress email from unreliable to trustworthy in under twenty minutes. The App Password step catches most people because it is poorly documented elsewhere, but once you have generated it correctly and entered it without spaces, the rest of the configuration is simple and the result is immediate. Your WordPress emails go out through Google’s infrastructure, pass every authentication check that spam filters run, and land in your recipients’ inboxes instead of their junk folders.

Pair the SMTP configuration with an active email log, which Nexu Mail SMTP includes as a built-in feature alongside Gmail SMTP configuration, and you have both the delivery fix and the ongoing visibility to confirm it continues working correctly every day, not just on the day you set it up.

Gmail SMTP · Google Workspace · Email Log · Delivery Tracking

Connect WordPress to Gmail in 20 minutes. Never worry about email delivery again.

Nexu Mail SMTP makes Gmail and Google Workspace SMTP configuration straightforward, and adds a full email log so you know every email is reaching its destination, every time.

Nexu Mail SMTP – WordPress Gmail SMTP plugin with email log and delivery verification

Nexu Mail SMTP by NEXU WP
Gmail & Workspace SMTP · Email Log · Resend · Failure Alerts · WooCommerce


Get Nexu Mail SMTP

Picture of Mahdi Jabinpour

Mahdi Jabinpour

As a sales-driven developer and the founder of NexuWP, Mahdi focuses on building WordPress solutions that don't just work—they convert. From AI-powered bulk translation engines to high-efficiency media offloading, he helps business owners automate the "grind" so they can focus on global growth. He is a pioneer in integrating advanced LLMs into the WordPress workflow.

RELATED POSTS

RELATED POSTS

4 Reviews
Richard Taylor 2 months ago

The guide says to use the "exact settings," but the SMTP port field is blank in all the screenshots. I tried 465 and 587, and neither worked ended up having to look it up myself

mehdiadmin 2 months ago

I really appreciate you catching that we'll update the documentation with the correct ports (587 for TLS, 465 for SSL) right away. Thanks for working with us on this

Lisa Moore 3 months ago

Okay, so I installed and activated it now how do I actually check if Gmail SMTP is working?

James Jackson 3 months ago

As a part time tutor who sends a ton of automated emails through my WordPress site, I was always dealing with messages ending up in spam or just vanishing into thin air. I tried a bunch of plugins and random fixes, but nothing actually worked until I stumbled on this guide. The part about setting up the Gmail App Password was the one thing no other tutorial even mentioned. took me maybe 15 minutes to figure out, and now every single email goes straight to the inbox like it should.

Christopher Hernandez 3 months ago

I set up Gmail SMTP just like the guide said, but how can I tell if emails are actually going through? the log says "sent," but is there a way to double check they're not just sitting in limbo?

mehdiadmin 3 months ago

We'd recommend sending a test email to your personal inbox to confirm everything's working. Once it arrives, you can trust Gmail's logs for delivery confirmation.

Please log in to leave a review.