How to Set Up Gmail SMTP in WordPress
The Gmail card sends through smtp.gmail.com on port 587 with TLS. It works with a free Gmail address and with Google Workspace.
Gmail is a mailbox, not a bulk email service. Use it for a small site, a contact form, or a test. Do not use it for a newsletter with thousands of recipients.
Before you begin
You need:
- A Gmail or Google Workspace mailbox.
- 2-Step Verification turned on. Google requires it before it will create an app password.
- The From address set to the same mailbox, or to an alias you are allowed to send from.
Step 1: Create an app password
- Open your Google Account at myaccount.google.com.
- Go to Security.
- Turn on 2-Step Verification if it is off.
- Open App passwords.
- Create a new app password for WordPress or LetterPress.
- Copy the 16-character password. Google shows it once.
A normal Google password will not work. Google removed the old "less secure apps" option, so an app password is the only supported route.
Step 2: Enter the details in LetterPress
- Open Settings > Email providers.
- Select Gmail.
- Enter the full Gmail address in Gmail address.
- Paste the app password in App password.
- Click Save changes.
- If the default button is shown, set Gmail as the default provider.
- Click Test connection.
Step 3: Set the sender
Open Settings > Sender identity and set From email to the same Gmail address. If you use a Google Workspace alias, set the From address to that alias.
Gmail rewrites the sender when the From address does not belong to the account. The message may still send, but recipients see a different address.
Step 4: Send a test
Click Send test email on the Gmail card. Then open Settings > Sender identity and send a test email.
The WordPress test is the one that covers password resets and plugin notifications.
Limits
Google applies daily sending limits. Free Gmail accounts have a lower limit than Google Workspace accounts, and the numbers can change. Check Google's current limits before you rely on Gmail for important mail.
Gmail also scans messages and may reject content that looks like bulk marketing. For newsletters, use a provider built for bulk sending.
Common problems
| Problem | What to check |
|---|---|
535 Authentication failed | Use an app password, not the account password. Check for extra spaces. |
| App passwords menu is missing | 2-Step Verification is off, or the account is managed by an organization that blocks app passwords. |
| From address is rewritten | Set the From address to the Gmail mailbox or a verified alias. |
| Mail stops after a while | The app password was revoked, or the daily limit was reached. |
| Workspace mailbox rejects login | An admin may need to allow SMTP AUTH or app passwords for the organization. |
Next steps
- Read SMTP authentication failed if the login fails.
- Improve inbox delivery with SPF, DKIM, and DMARC.
- Move Gmail settings from another plugin with SMTP migration.