How to Configure SMTP for WordPress (Fix Emails Going to Spam)

Fix Emails Going to Spam
Many WordPress websites experience email problems such as:
- ❌ Contact form emails not sending
- 📧 WooCommerce order emails missing
- ⚠️ Emails going directly to spam folders
- 🔕 Password reset emails not arriving
This happens because WordPress uses the default PHP mail function, which many hosting servers restrict or block.
The best solution is to configure SMTP (Simple Mail Transfer Protocol) so emails are sent through a trusted mail server.
In this guide, you will learn how to configure SMTP in WordPress step-by-step.
⚡ Quick Fix Overview
To fix WordPress email problems:
1️⃣ Install an SMTP plugin
2️⃣ Connect your website to an SMTP server
3️⃣ Authenticate email with login credentials
4️⃣ Test email delivery
After configuring SMTP, emails will send reliably and avoid spam filters.
⚠️ Why WordPress Emails Go to Spam
WordPress sends emails using the PHP mail() function, which lacks proper authentication.
Common causes include:
- No email authentication
- Hosting server blocking mail function
- Domain not verified for email sending
- Missing SPF or DKIM records
SMTP solves these problems by using authenticated mail servers.
🛠 Step-by-Step SMTP Setup
Follow these steps to configure SMTP.
🔧 1. Install an SMTP Plugin
First install an SMTP plugin.
Steps:
1️⃣ Go to WordPress Dashboard → Plugins → Add New
2️⃣ Search for WP Mail SMTP
3️⃣ Install and activate the plugin
This plugin allows WordPress to send emails through SMTP servers.
⚙️ 2. Configure SMTP Settings
After installing the plugin:
Go to:
WP Mail SMTP → Settings
Enter the following details.
Example SMTP configuration:
Mailer: Other SMTP
SMTP Host: smtp.gmail.com
Encryption: TLS
SMTP Port: 587
Authentication: Yes
🔑 3. Enter Email Login Credentials
Add the login credentials of the email account you want to send emails from.
Example:
SMTP Username: yo********@***il.com
SMTP Password: your-email-password
These credentials authenticate your emails with the mail server.
📬 4. Set the “From Email”
Set the From Email address used by WordPress.
Example:
From Email: ad***@********in.com
From Name: Your Website Name
Using your domain email helps improve email deliverability.
🧪 5. Send a Test Email
Most SMTP plugins include an email testing feature.
Steps:
1️⃣ Go to WP Mail SMTP → Tools
2️⃣ Send a Test Email
If configured correctly, the email should arrive instantly.
📧 Recommended SMTP Providers
You can configure SMTP using several email providers:
- Gmail SMTP
- Outlook SMTP
- Zoho Mail
- Mailgun
- SendGrid
These services provide authenticated email delivery.
🌐 Check Email Authentication (Important)
To prevent spam filtering, configure these DNS records.
SPF Record
SPF verifies authorized mail servers.
Example:
v=spf1 include:_spf.google.com ~all
DKIM Record
DKIM adds a digital signature to emails.
It verifies that emails come from your domain.
DMARC Record
DMARC improves domain email security.
Example:
v=DMARC1; p=none;
These records improve email deliverability.
🔐 Prevent WordPress Email Problems
Follow these best practices:
✔ Use SMTP instead of PHP mail
✔ Use a domain email address
✔ Configure SPF and DKIM records
✔ Avoid sending bulk emails from WordPress
✔ Regularly test email delivery
These steps ensure reliable email sending.
❓ Frequently Asked Questions
This usually happens because the PHP mail function is blocked or unauthenticated.
Yes. SMTP sends emails through authenticated mail servers, which improves reliability.
Yes. SMTP ensures WooCommerce order notifications are delivered correctly.
Yes. WordPress requires an SMTP plugin to connect with mail servers.
🔗 Related WordPress Fix Guides
You may also find these helpful:
- Fix “Error Establishing a Database Connection” in WordPress
- Fix “Too Many Redirects” Error After Installing SSL
- How to Fix WooCommerce Shipping Cost Not Calculating (Complete Guide)
These guides solve other common WordPress errors.
WordPress email issues usually occur because the default PHP mail function lacks authentication.
By configuring SMTP with a trusted email provider, you can ensure reliable email delivery for:
- contact forms
- WooCommerce orders
- password reset emails
- website notifications
Once SMTP is properly configured, your WordPress website will send emails securely and consistently.