Technical Guides14 min read

WordPress Email Not Sending? SMTP Setup Guide for Contact Forms

WordPress wp_mail() is broken by default on most hosts. Here is the complete SMTP setup guide to get your contact forms, notifications, and WooCommerce emails delivering reliably.

May 9, 2026 14 min read Step-by-Step

You set up a beautiful WordPress site, installed a contact form plugin, and waited for leads. Nothing came. You check the spam folder — empty. You submit a test message yourself — silence. The form says "Message sent successfully" but the email never arrives.

This is the #1 support issue for WordPress contact forms, and it has nothing to do with your form plugin. The problem is that WordPress relies on PHP's mail() function, which shared hosting providers have quietly disabled or crippled. This guide shows you the proper fix: configuring SMTP with a reliable email relay.

Quick Start: Fix in 10 Minutes

Step 1: Install WP Mail SMTP

Go to Plugins > Add New, search "WP Mail SMTP by WPForms", install and activate.

Step 2: Get SendGrid API Key

Sign up free at sendgrid.com, verify your domain, create an API key under Settings.

Step 3: Configure Plugin

In WP Mail SMTP settings, choose "SendGrid", paste your API key, set "From Email" to your domain.

Step 4: Test & Done

Click "Send Test Email", check your inbox. Submit your contact form. You are live.

Why WordPress wp_mail() Fails on Most Hosts

PHP mail() Disabled

GoDaddy, Bluehost, HostGator, and SiteGround have disabled PHP mail() on shared hosting. The function returns "success" but nothing is sent.

IP Blacklisted

Your web server shares an IP with hundreds of sites. If one sends spam, the entire IP gets blacklisted. Your legitimate emails get rejected.

No Authentication

PHP mail() sends without SMTP authentication. Receiving servers treat unauthenticated email as suspicious and flag it as spam.

Expert Help Available

Have questions about this topic?

Our migration specialists can help. Chat live or request a free consultation.

Contact Us

Best WordPress SMTP Plugins Compared

WP Mail SMTP

FreePro: $49/yr

Most users — easiest setup, best support

1M+ 4.8
SendGrid, Mailgun, Gmail, OutlookBuilt-in email testEmail log (Pro)Notification controls (Pro)

FluentSMTP

Free

Advanced users — multiple providers, logging

200K+ 4.9
Multiple SMTP providersNative email logConnection health checkFallback mailer

Post SMTP Mailer

FreePro: $39/yr

Developers — OAuth 2.0, detailed logs

300K+ 4.7
OAuth 2.0 for Gmail/OutlookDelivery failure notificationsDetailed connection logMIME support

Easy WP SMTP

FreePro: $29/yr

Simple needs — basic SMTP only

600K+ 4.5
Custom SMTP serverSSL/TLS supportDebug loggingSimple configuration

SMTP Provider Comparison for WordPress

ProviderFree TierPaid StartSetup TimeBest For
SendGrid100/day$19.95/mo (50K)API key — 5 minSmall business, easy setup
Mailgun5K/mo (3mo)$35/mo (50K)API key + domain verify — 10 minDevelopers, high volume
Brevo300/day$25/mo (20K)API key — 5 minMarketing + transactional
Google Workspace2K/dayIncluded in planApp password — 10 minExisting Workspace users
Microsoft 36510K/dayIncluded in planApp password — 10 minExisting M365 users
Amazon SES62K/mo (from EC2)$0.10 per 1K emailsAWS setup — 30 minEnterprise, developers

Complete SendGrid + WordPress Setup Walkthrough

The most popular setup — SendGrid free tier with WP Mail SMTP:

1

Create a SendGrid Account

Go to sendgrid.com and sign up for a free account. No credit card required for the free tier.

Sign Up Free
2

Verify Your Domain

In SendGrid Dashboard, go to Settings > Sender Authentication > Domain Authentication. Add your domain and follow DNS instructions.

Verify Domain
3

Create an API Key

Go to Settings > API Keys. Click "Create API Key", name it "WordPress SMTP", select "Full Access", and copy the key.

Create Key
4

Install WP Mail SMTP

In WordPress admin, go to Plugins > Add New. Search "WP Mail SMTP", install and activate by WPForms.

Install Plugin
5

Configure Mailer Settings

Go to WP Mail SMTP > Settings. Set "From Email" to noreply@yourdomain.com. Choose "SendGrid" as mailer. Paste your API key.

Configure
6

Send Test Email

Click the "Send Test Email" tab, enter your email address, and send. Check inbox and spam folder.

Test Now

Advanced: wp-config.php SMTP Constants

For developers who prefer to configure SMTP in code instead of a plugin:

wp-config.php
<?php
// WordPress wp-config.php SMTP settings
// Add these before the "That's all, stop editing!" line

define('SMTP_USER', 'your-email@domain.com');
define('SMTP_PASS', 'your-app-password-or-api-key');
define('SMTP_HOST', 'smtp.sendgrid.net');
define('SMTP_PORT', 587);
define('SMTP_SECURE', 'tls');       // 'tls' for 587, 'ssl' for 465

// Optional: force "From" address
define('WP_MAIL_FROM', 'noreply@yourdomain.com');
define('WP_MAIL_FROM_NAME', 'Your Company Name');
?>

Note: You still need a plugin or custom functions.php code to read these constants. WP Mail SMTP is the recommended approach for reliability.

SMTP Troubleshooting Checklist

Connection timed out

Your host may be blocking outbound SMTP on port 587. Try port 465 (SSL) or contact your host to whitelist SMTP.

Authentication failed

Double-check your API key or app password. For Gmail/Outlook, use app-specific passwords, not your regular password.

Emails in spam folder

Verify SPF, DKIM, and DMARC records. Use Mail-Tester.com to get a deliverability score. Warm up a new sending domain.

Test email sends but form does not

Check your contact form plugin settings — wrong "To" address, notification disabled, or conflict with another plugin.

Daily email limit reached

Shared hosts often limit to 100-250 emails/day. Upgrade your SMTP plan or switch to a dedicated transactional email service.

Domain not verified

SendGrid and Mailgun require domain verification before sending. Complete the DNS verification steps in their dashboards.

Free Consultation

Need WordPress Email Help?

Our web development team configures SMTP, fixes contact forms, and resolves DNS email issues. Get your WordPress site sending emails reliably.

Contact Page
24hr responseNo obligationFree quote

Get a Free Migration Quote

No spam, just expert advice.

Frequently Asked Questions: WordPress SMTP

QWhy is WordPress not sending emails from my contact form?
WordPress uses the PHP mail() function by default, which most shared hosting providers have disabled or severely limited. Reasons include: (1) PHP mail() is disabled for security, (2) your server's IP is on a spam blacklist, (3) your domain lacks proper SPF/DKIM/DMARC records, (4) your hosting provider imposes a daily email limit (often 100-250/day), (5) the "From" address does not match your domain, triggering spam filters. The solution is configuring WordPress to use SMTP with a plugin like WP Mail SMTP and a proper email relay service.
QWhat is the best WordPress SMTP plugin?
WP Mail SMTP by WPForms is the best option for most users. It is free, actively maintained (1+ million installs), supports 10+ mailer services, and includes a built-in email log and test tool. Alternatives: (1) FluentSMTP — free, lightweight, supports multiple SMTP providers simultaneously. (2) Post SMTP Mailer — free, excellent for advanced users, supports OAuth 2.0 for Gmail/Outlook. (3) Easy WP SMTP — simple, no-frills setup for basic SMTP. Avoid plugins that have not been updated in 6+ months — SMTP security changes frequently.
QHow do I configure SendGrid SMTP in WordPress?
Step-by-step SendGrid setup: (1) Sign up at sendgrid.com and verify your domain under Settings > Sender Authentication. (2) Go to Settings > API Keys and create a Full Access API key. (3) In WordPress, install WP Mail SMTP plugin. (4) Go to WP Mail SMTP > Settings, select "SendGrid" as mailer. (5) Paste your API key. (6) Set "From Email" to an address on your verified domain. (7) Send a test email. This setup takes 10 minutes and gives you 100 free emails/day with excellent deliverability.
QCan I use Google Workspace Gmail SMTP for WordPress?
Yes, but you need an app-specific password (not your regular password): (1) Enable 2-Step Verification in your Google Account. (2) Go to Security > App passwords, select "Mail" and your device, then copy the 16-character password. (3) In WP Mail SMTP, choose "Other SMTP" and enter: Host: smtp.gmail.com, Port: 587, Encryption: TLS, Authentication: On, Username: your full Gmail/Workspace address, Password: the 16-character app password. (4) Set "From Email" to your Workspace address. (5) Send a test. Note: Google limits this to 2,000 emails/day for Workspace accounts. For high-traffic sites, use SendGrid instead.
QHow do I test if WordPress SMTP is working?
After configuring SMTP, test in this order: (1) In WP Mail SMTP settings, click "Send Test Email" and enter your address. Check inbox and spam. (2) Submit your contact form and verify the notification arrives. (3) Check WP Mail SMTP > Email Log to see if emails were sent successfully. (4) Use Mail-Tester.com — send a test email to their address and get a deliverability score (aim for 8+/10). (5) Check your SMTP provider's dashboard (SendGrid, Mailgun) for delivery stats and any bounce/error messages.
QIs WP Mail SMTP free or do I need the Pro version?
The free version of WP Mail SMTP handles everything most small businesses need: SMTP configuration for SendGrid, Mailgun, Gmail, Outlook, and custom SMTP. The Pro version ($49/year) adds: email logs with search, notification controls (choose which WordPress events send email), advanced reporting, and white glove setup support. For most users, the free version is sufficient. Upgrade to Pro only if you need email logging for compliance or want to control which WordPress notifications go out.

WordPress Emails Still Not Working?

Our web team diagnoses and fixes WordPress email issues, SMTP configuration, and DNS problems. Get your contact forms and notifications working reliably.

Ready to migrate without the headaches?

Zero downtime · Zero data loss · 100% money-back guarantee

5.0· 600+ reviews

Professional email migration services for Microsoft 365 and Google Workspace. 14 years experience. Zero downtime guaranteed.

5.0
600+ verified client reviews

Services

Company

Resources

1,000+
Migrations Completed
600+
Five-Star Reviews
14 Years
Industry Experience
0%
Downtime Guarantee

© 2026 Workspace Migration. All rights reserved.

Talk with Us