Tutorials

How to Fix WordPress Not Sending Emails (Free SMTP Setup with Gmail / Brevo)

How to Fix WordPress Not Sending Emails (Free SMTP Setup) - CpanelFree Guide
Written by Blog

Quick Answer: WordPress fails to send password reset emails and WooCommerce order receipts because it relies on the default PHP mail() function, which lacks SMTP authentication and is blocked by most web hosting firewalls and inbox spam filters. To fix it, install the free WP Mail SMTP or FluentSMTP plugin and connect a free transactional SMTP relay like Brevo (Sendinblue) (300 free emails/day) or Gmail SMTP.

Why Default WordPress PHP mail() Fails

When WordPress triggers an email using wp_mail(), it calls the web server’s local sendmail daemon. Because these emails originate directly from a web server IP (often without PTR reverse DNS records or DKIM signatures), major mail providers flag them as potential spam and discard them silently.

Step 1: Install WP Mail SMTP or FluentSMTP

  1. In your WordPress dashboard, go to Plugins > Add New.
  2. Search for WP Mail SMTP (or FluentSMTP) and click Install Now, then Activate.

Step 2: Create a Free Brevo (Sendinblue) Account

  1. Create a free account on Brevo.com (Includes 300 emails/day 100% free forever).
  2. Go to Senders & IP and add your custom business email (e.g. [email protected]).
  3. Go to SMTP & API and copy your API Key.

Step 3: Connect Brevo to WordPress

  1. In WordPress, go to WP Mail SMTP > Settings.
  2. Set From Email to your verified domain email (e.g. [email protected]).
  3. Under Mailer, select Brevo.
  4. Paste your Brevo API Key into the field and click Save Settings.

Step 4: Send a Test Email to Verify Inbox Delivery

Navigate to WP Mail SMTP > Tools > Email Test, enter your personal email address, and click Send Email. You should receive a green confirmation indicating 250 OK inbox delivery.

Comparing Free Transactional SMTP Services in 2026

SMTP Provider Free Monthly Quota Connection Method Dedicated IP Support
Brevo (Sendinblue) 9,000 / month (300/day) REST API / SMTP Port 587 Optional Add-on
Mailgun 5,000 Free Trial REST API / Webhooks Enterprise Tier
Google Workspace / Gmail API 2,000 / day (Workspace) OAuth 2.0 Client Tokens Shared Google IP Mesh

Automating Email Failure Alerts with FluentSMTP Logging

Install FluentSMTP to maintain an encrypted local database log of all outgoing emails. If a transactional email fails due to recipient server bounces, FluentSMTP automatically logs the exact SMTP response code (e.g. 550 User Unknown or 421 Service Unavailable) for instant troubleshooting.

Step-by-Step SMTP Troubleshooting Guide for WordPress

  1. Check Hosting Port 25/587 Blocks: Many cloud providers (like DigitalOcean, AWS EC2, and Linode) block outbound port 25 to prevent spam. Always connect SMTP relays over port 587 (STARTTLS) or port 465 (SSL/TLS).
  2. Match Sender Email to Verified Domain: Ensure the From Email address declared in your SMTP plugin exactly matches the domain authorized in your SMTP relay (e.g. [email protected]). Sending as an unauthorized address triggers 550 Sender Verify Failed errors.
  3. Verify TLS Cryptographic Handshake: Ensure your server’s PHP cURL and OpenSSL libraries are updated to negotiate TLS 1.2 or TLS 1.3 encryption.

Configuring Fallback SMTP Relays in FluentSMTP

FluentSMTP allows you to configure a secondary fallback connection (e.g. Primary: Brevo, Fallback: Gmail API). If your primary relay experiences temporary rate limiting or API downtime, FluentSMTP automatically routes transactional receipts through the backup connection without dropping user emails.

Reliable Free Hosting on CpanelFree

Deploy WordPress with free cPanel webmail, web hosting, and SMTP support at 100% zero cost on CpanelFree.

Deploy Free WordPress Site

Frequently Asked Questions

Can I use standard personal Gmail SMTP without API keys?

Google no longer supports “Less Secure Apps” passwords. To use Gmail, you must generate a dedicated Google App Password with 2FA enabled or connect via OAuth 2.0 Client ID.

Troubleshooting Gmail API OAuth 2.0 Token Expiration

If you connect WordPress to Gmail using OAuth 2.0 API credentials and emails suddenly stop sending after 7 days, your Google Cloud App is in “Testing Mode”. Navigate to the Google Cloud Console, open OAuth consent screen, and click Publish App to make your refresh tokens permanent.

Is Brevo SMTP 100% free for WordPress?

Yes. Brevo offers a permanent free tier providing 300 emails per day (9,000 emails per month) with dedicated API integration, real-time deliverability tracking, and zero credit card requirements.

Pro Sysadmin Tip: Setting Up Custom Reverse DNS (PTR)

If you operate a private VPS mail relay, configure a valid PTR (Reverse DNS) record in your hosting dashboard matching your mail hostname (e.g. mail.yourdomain.com) to pass Spamhaus validation tests.

Replacing default PHP mail with authenticated SMTP relays ensures that every customer receipt, registration notification, and password reset email lands reliably in the primary inbox.

Connecting WordPress to dedicated SMTP relays like Brevo or Gmail API permanently solves deliverability failures, ensuring critical customer notifications are delivered instantly with 100% reliability.

About the author

Blog

DevOps architect and Linux sysadmin specializing in server hardening, OpenLiteSpeed performance optimization, and free cloud hosting infrastructure.

Leave a Comment