HowTo

How to Set Up SMTP in WordPress So Emails Arrive

SMTP in WordPress – How to Set Up SMTP in WordPress So Emails Arrive

In this guide: How to set up SMTP in WordPress so emails arrive: why WordPress emails fail, what SMTP is, installing an SMTP plugin, connecting an email service, and…

Your contact form says “Message sent!” — but the email never arrives. Customers don’t get order confirmations. Password reset emails vanish. This is one of the most common WordPress problems, and the fix is almost always the same: set up SMTP.

Why WordPress emails fail

By default, WordPress sends email using PHP’s mail() function through your web server. Problems:

  • No proper authentication: mailbox providers like Gmail and Outlook can’t verify the email really comes from your domain.
  • Shared server reputation: your hosting server’s IP may be shared with others who send spam.
  • Mismatched sender: WordPress often sends from wordpress@yourdomain.com, which may not exist or match your SPF/DKIM setup.
  • Hosting restrictions: some hosts limit or disable PHP mail.
  • Stricter rules: Gmail and Yahoo have tightened authentication requirements for senders.

Result: emails land in spam or are rejected silently.

What SMTP is

SMTP (Simple Mail Transfer Protocol) is the standard protocol for sending email. Setting up SMTP in WordPress means your site sends email through a real, authenticated email service — just like your email app does.

Benefits:

  • Authenticated sending with SPF, DKIM, and DMARC alignment.
  • Better deliverability — emails reach inboxes.
  • Logs and tracking — see what was sent and whether it failed.
  • Reliability — specialized infrastructure built for sending.

Installing an SMTP plugin

Popular options:

  • WP Mail SMTP: widely used, with a setup wizard and many mailer integrations.
  • FluentSMTP: free, lightweight, supports multiple connections and fallback.
  • Post SMTP: includes logging and alerts.
  • Your email service’s official plugin (some services provide their own).

Install one plugin only. Some form plugins and WooCommerce extensions also include sending options — avoid conflicting setups.

Connecting an email service

Option 1 — Transactional email service (recommended for most sites)
Services built for website and application emails, often with free tiers for low volume. Examples include Brevo, SendGrid, Mailgun, Postmark, Amazon SES, and SMTP2GO (check current plans).

Steps:

  1. Create an account with the service.
  2. Verify your domain by adding the DNS records it provides (DKIM, and often SPF and return-path/CNAME records).
  3. Create an API key (preferred) or SMTP credentials.
  4. In your SMTP plugin, choose the service as your mailer and paste the API key.
  5. Set the From Email to an address on your domain (e.g., hello@yourdomain.com or notifications@yourdomain.com) and Force From Email if available.
  6. Set a recognizable From Name (your brand).

Option 2 — Google Workspace or Microsoft 365

  • Many SMTP plugins can connect via OAuth to Google or Microsoft.
  • Good for low-volume sites; these services have sending limits and aren’t designed for bulk sending.

Option 3 — Your host’s SMTP server

  • Use the mailbox credentials from your hosting email. Better than PHP mail, but deliverability depends on your host’s reputation.

Update DNS:

  • ☐ SPF: include your email service (one SPF record per domain — merge multiple services into a single record).
  • ☐ DKIM: add the records from your service.
  • ☐ DMARC: start with a monitoring policy (e.g., p=none) and tighten later.

Learn what each does in SPF, DKIM and DMARC in Plain English.

Testing deliverability

  1. Send a test email from the SMTP plugin’s test tool to Gmail and Outlook addresses.
  2. Check inbox vs spam.
  3. View the email headers (“Show original” in Gmail) and confirm SPF, DKIM, and DMARC: PASS.
  4. Submit your contact form and complete a test order (for stores).
  5. Use a mail tester service to get a deliverability score and specific recommendations.
  6. Enable email logging in your plugin so you can see failures.
  7. Set up failure alerts if available.

Other tips:

  • Save form entries in your form plugin as a backup, in case an email fails — see How to Create a Contact Form in WordPress.
  • Use a reply-to address that reaches a real inbox.
  • Don’t send newsletters through your transactional service unless it’s designed for both — use an email marketing platform for campaigns.

Further reading: official WordPress documentation

Key Takeaways: SMTP in WordPress

  • WordPress’s default PHP mail often lands in spam or fails.
  • SMTP sends email through an authenticated, reliable service.
  • Use an SMTP plugin with a transactional email service or your business email.
  • Add SPF, DKIM, and DMARC records.
  • Test with real inboxes and check headers for PASS results.
Z
zasma171

Writes for Hostreta about the topics covered in this article.

Comments (0)

Your email address will not be published. Required fields are marked *

Recent Comments

No comments to show.
Ad · AdSense
Ad space 300×250
Affiliate links
Tools we recommend
Protect Your Website with Automated Daily Backups
$2.09
Get it
the easiest way to manage all of your social media accounts
$29
Get it
Starter Website Get online, properly
$249
Get it
google workspace Business Starter
$3.75
Get it
Nord Vpn Cybersecurity. Built for Everyday Use
$8.99
Get it

We may earn a commission on purchases made through these links, at no extra cost to you.

Ad · AdSense
Ad space 300×600
Ad · AdSense
Ad space 300×600

$ top hosting picks

affiliate
★★★★★

NovaHost

$2.95/mo,renews at $9.95
  • Free SSL + domain, first year
  • 1-click WordPress install
  • 24/7 chat, sub-5-min response
get this deal →
affiliate link · we may earn a commission
★★★★★

CloudRoot

$4.50/mo,renews at $12.95
  • Built-in CDN + caching
  • Daily backups, 30-day retention
  • Staging environments included
get this deal →
affiliate link · we may earn a commission
★★★★★

AI SiteBuilder

$1.49/mo,renews at $13.99
  • 5 Websites
  • Emails & Security Included
  • AI Website Builder for WordPress
get this deal →
affiliate link · we may earn a commission

Never miss a new article

Join thousands of developers and builders getting a weekly digest of the best tech articles.