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.
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.
Have questions about this topic?
Our migration specialists can help. Chat live or request a free consultation.
Best WordPress SMTP Plugins Compared
WP Mail SMTP
FreePro: $49/yrMost users — easiest setup, best support
FluentSMTP
FreeAdvanced users — multiple providers, logging
Post SMTP Mailer
FreePro: $39/yrDevelopers — OAuth 2.0, detailed logs
Easy WP SMTP
FreePro: $29/yrSimple needs — basic SMTP only
SMTP Provider Comparison for WordPress
| Provider | Free Tier | Paid Start | Setup Time | Best For |
|---|---|---|---|---|
| SendGrid | 100/day | $19.95/mo (50K) | API key — 5 min | Small business, easy setup |
| Mailgun | 5K/mo (3mo) | $35/mo (50K) | API key + domain verify — 10 min | Developers, high volume |
| Brevo | 300/day | $25/mo (20K) | API key — 5 min | Marketing + transactional |
| Google Workspace | 2K/day | Included in plan | App password — 10 min | Existing Workspace users |
| Microsoft 365 | 10K/day | Included in plan | App password — 10 min | Existing M365 users |
| Amazon SES | 62K/mo (from EC2) | $0.10 per 1K emails | AWS setup — 30 min | Enterprise, developers |
Complete SendGrid + WordPress Setup Walkthrough
The most popular setup — SendGrid free tier with WP Mail SMTP:
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 FreeVerify Your Domain
In SendGrid Dashboard, go to Settings > Sender Authentication > Domain Authentication. Add your domain and follow DNS instructions.
Verify DomainCreate an API Key
Go to Settings > API Keys. Click "Create API Key", name it "WordPress SMTP", select "Full Access", and copy the key.
Create KeyInstall WP Mail SMTP
In WordPress admin, go to Plugins > Add New. Search "WP Mail SMTP", install and activate by WPForms.
Install PluginConfigure Mailer Settings
Go to WP Mail SMTP > Settings. Set "From Email" to noreply@yourdomain.com. Choose "SendGrid" as mailer. Paste your API key.
ConfigureSend Test Email
Click the "Send Test Email" tab, enter your email address, and send. Check inbox and spam folder.
Test NowAdvanced: wp-config.php SMTP Constants
For developers who prefer to configure SMTP in code instead of a plugin:
<?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.
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.
Get a Free Migration Quote
No spam, just expert advice.
Related Guides
Website Contact Form Not Working? Fix Guide
General contact form troubleshooting for any platform
SPF, DKIM, DMARC Setup Guide
Configure email authentication for better deliverability
Email Migration Spam Issues: Complete Fix
Fix deliverability after domain or hosting changes
Email Authentication Service
We configure SPF, DKIM, DMARC for any domain
Frequently Asked Questions: WordPress SMTP
QWhy is WordPress not sending emails from my contact form?
QWhat is the best WordPress SMTP plugin?
QHow do I configure SendGrid SMTP in WordPress?
QCan I use Google Workspace Gmail SMTP for WordPress?
QHow do I test if WordPress SMTP is working?
QIs WP Mail SMTP free or do I need the Pro version?
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.