The fastest fix for broken or missing WordPress emails is to route them through an authenticated SMTP provider, either with a trusted plugin or a PHPMailer code snippet, then publish SPF and DKIM records. Set your From address to match your domain, choose port 587 with STARTTLS, the common default, unless your provider specifies otherwise, and finish with a test send before trusting the setup.
TL;DR:
- Plugins offer setup wizards, OAuth, test sends, and failure logs; technical administrators can use PHPMailer, while HTTP APIs bypass hosts that block SMTP.
- Begin DMARC at p=none, then strengthen its policy only after SPF and DKIM pass consistently, since SMTP alone does not prevent spam placement.
- Test plugin delivery and password reset separately, then inspect Gmail’s authentication fields for SPF and DKIM; a successful dashboard test alone proves little.
- Enable email logs and failure alerts, schedule test sends, and recheck DNS after hosting changes; an initial success does not guarantee ongoing inbox delivery.
Table of Contents
- Should you use a plugin or configure PHPMailer directly?
- Setting up an SMTP plugin field by field
- Configuring SMTP without a plugin using PHPMailer
- Publishing SPF, DKIM, and DMARC records
- Testing and troubleshooting delivery failures
- Keeping email reliable after setup
- A quick SMTP checklist from our team
- What actually matters most in SMTP setup
- How we help with SMTP and DNS at InSave Hosting
- FAQ
- Sources
Should you use a plugin or configure PHPMailer directly?
Most site owners get the quickest result with an SMTP plugin like WP Mail SMTP or Post SMTP. These tools add a setup wizard, built-in OAuth connections for Google and Office 365, a one-click test send, and logs that flag failed messages before a customer notices a missing password reset.
The no-plugin route appeals to technical admins who want fewer moving parts. You store credentials directly in wp-config.php and hook into PHPMailer, which keeps one less plugin active on the site and gives full control over the mail transport.
Your hosting environment also matters. If your host blocks outbound SMTP ports, an HTTP API transport (the kind many SMTP plugins support for providers like SendGrid or Mailgun) sidesteps the block entirely, while a standard SMTP connection works fine wherever those ports stay open.
- Plugins suit most site owners: wizards, OAuth, logging, and alerts with no code.
- The PHPMailer route suits technical admins who prefer fewer plugins and direct control.
- An API/HTTP transport is the fix when a host blocks outbound SMTP ports.
Setting up an SMTP plugin field by field
Once installed, a plugin's setup wizard walks you through the same core fields regardless of which one you choose. WP Mail SMTP, for instance, offers a guided flow plus recommended mailers for common providers, or an "Other SMTP" option for custom hosts.
- Install the plugin and launch its setup wizard from the WordPress dashboard.
- Pick a recommended mailer for common providers or choose "Other SMTP" for a custom mail server.
- Enter a From name and From email that use your own domain, and set the Envelope-From separately if the plugin exposes that option.
- Fill in the SMTP host, port (587 for STARTTLS or 465 for implicit SSL), the matching encryption setting, and turn SMTPAuth on.
- Enter your username and password or API key, then save the settings.
- Run the plugin's built-in test-send function and confirm the message arrives.
- Check any logs the plugin records and note the result before moving on.
Pro Tip: Send your first test to a second inbox you control, like a personal Gmail address, so you can inspect the raw headers instead of just confirming it landed.
Configuring SMTP without a plugin using PHPMailer
For a leaner setup, add your SMTP credentials as constants in wp-config.php, then hook a phpmailer_init callback that calls isSMTP() and applies those values. This no-plugin approach keeps the plugin count down and works well on a single technical site.
- Define
SMTP_HOST,SMTP_USER,SMTP_PASSWORD,SMTP_PORT,SMTP_SECURE,SMTP_FROM, andSMTP_FROMNAMEas constants inwp-config.php. - In your callback, set the PHPMailer object's
Host,Port,Username,Password,SMTPSecure, andFromproperties to those constants. - Test by triggering a password-reset email from the login screen, which exercises the full send path end to end.
- Temporarily set
SMTPDebugto a verbose level to capture the SMTP conversation, then turn it back off once you've diagnosed the issue.
Keep wp-config.php outside the web root where your hosting setup allows it, and remove any debug logging as soon as you've confirmed mail works, since verbose logs can expose credentials.
Publishing SPF, DKIM, and DMARC records
SMTP configuration handles the handoff between your site and the mail server, but SPF, DKIM, and DMARC are what convince a receiving inbox the message is legitimate. The WordPress developer documentation recommends all three for reliable deliverability, on top of a properly configured SMTP connection.
- SPF: add a TXT record authorizing your mail provider's servers to send on your domain's behalf; your provider's dashboard will give you the exact value to use.
- DKIM: your SMTP provider generates a public key as a TXT record, which you copy into your DNS zone exactly as shown.
- DMARC: start with a policy of
p=noneto monitor results safely, then tighten it once you've confirmed SPF and DKIM pass consistently.
Without SPF, DKIM, and DMARC in place, even a correctly configured SMTP connection can land in spam, because receiving servers use these records to verify the message actually came from your domain.
Testing and troubleshooting delivery failures
A working SMTP connection in the dashboard doesn't guarantee a message reaches the inbox, so test more than once and from more than one angle.
- Send a test through your plugin, then separately trigger a WordPress password-reset email to confirm both paths work.
- Open the delivered message in Gmail and check the "mailed-by" and "signed-by" fields, which confirm SPF and DKIM passed.
- If a send fails, enable PHPMailer's
SMTPDebugoutput or check your plugin's log to see the full SMTP session. - Look for failures at the AUTH, STARTTLS, or MAIL FROM steps, since each points to a different cause.
- Try the common fixes first: re-enter credentials, match the port to the correct encryption type (587 with STARTTLS or 465 with SSL), switch to an HTTP API transport if your host blocks SMTP ports outright, and check for a From-address mismatch.
- If none of that resolves it, contact your host or mail provider with the specific log snippet showing the failed step, which saves a round of back-and-forth diagnosis.
Keeping email reliable after setup
Initial setup gets mail flowing, but deliverability drifts over time if nobody is watching for it.
- Turn on your plugin's or provider's email logs and failure alerts so a bounce or rejection surfaces immediately instead of going unnoticed.
- Schedule periodic test sends and check inbox placement rather than just delivery, since a message can arrive in spam and still count as "sent."
- Rotate app passwords and review OAuth tokens periodically, and recheck your SPF and DKIM records after any DNS or hosting change.
Pro Tip: Set a recurring calendar reminder every few months to send a test email and glance at your logs, since a quiet failure can go unnoticed for weeks on a low-traffic site.
A quick SMTP checklist from our team
Our quick version: pick plugin or PHPMailer, set a From address and credentials on your own domain, publish SPF, DKIM, and DMARC, then run a real test send and turn on logging. If outbound mail still misbehaves, confirm with your host whether SMTP ports are open or whether a relay is required, since that one detail resolves a surprising share of support tickets. Our step-by-step email setup guide covers the longer walkthrough.

What actually matters most in SMTP setup
Most SMTP tutorials treat the plugin install as the finish line, but that's where the real work starts. A plugin that sends a successful test email tells you almost nothing about whether your messages will land in an inbox three weeks from now, after a password changes or a DNS record gets edited during an unrelated hosting migration.

The part readers skip, DNS authentication, is the part that actually determines whether your mail survives contact with Gmail or Outlook's spam filters. WordPress 6.9 improved how the Envelope-From address gets set by default, which helps some sites out of the box, but it doesn't replace a dedicated SMTP connection or a properly signed SPF and DKIM pair.
If you only have time for one thing beyond the basic setup, make it logging. A silent failure is worse than an obvious one, because you won't know a customer never got their order confirmation until they complain. Treat the install as step one and the monitoring as the part that actually protects your business.
— Ihor
How we help with SMTP and DNS at InSave Hosting
We built our WordPress hosting plans around the kind of setup work this guide covers: free migrations, one-click WordPress installs, and support for the DNS changes that SPF, DKIM, and DMARC require. Our shared hosting plans work the same way for smaller sites that just need mail to work reliably.

- We provide assistance with DNS record changes during hosting setup.
- Our support team can help verify whether outbound SMTP ports are open on your plan to assist with troubleshooting potential blocks.
If you'd rather have a team confirm the details with you, check our WordPress hosting plans and reach out through support to get your SMTP and DNS set up in one session.
FAQ
Which port should I use for SMTP, 587 or 465?
Port 587 with STARTTLS encryption is the common default most providers and setup guides recommend. Port 465 with implicit SSL works too and is sometimes required by specific providers, so check your provider's documentation if 587 doesn't connect.
Is there a free SMTP for WordPress?
Yes, several SMTP plugins and providers offer free tiers suitable for small sites. WP Mail SMTP has a free version with setup wizards and basic logging, and many SMTP services offer a free sending allowance for low-volume sites.
Do I need WP Mail SMTP?
You don't need that specific plugin, but you do need some way to route wp_mail() through an authenticated SMTP connection, since WordPress's default mail handling is unreliable on its own. A plugin like WP Mail SMTP, Post SMTP, or a direct PHPMailer configuration all accomplish the same underlying goal.
Is WP Mail SMTP by WPForms free?
WP Mail SMTP offers a free version in the WordPress.org plugin directory with setup wizards and provider integrations, alongside paid tiers that add features like white-glove setup assistance. The free tier covers the core SMTP configuration most small sites need.
Why does SMTP improve deliverability over PHP's default mail function?
PHP's built-in mail() function often sends from your server with no authentication, which many inbox providers flag as suspicious. Routing mail through an authenticated SMTP connection paired with SPF and DKIM records gives receiving servers a way to verify the message is legitimate.
Sources
- More-reliable email in WordPress 6.9
- Mail — WordPress Developer Resources
- WP Mail SMTP by WPForms – Free SMTP Plugin with Gmail, Outlook, Amazon SES, SendGrid, Mailgun, Zoho & other SMTP
- Configure WordPress SMTP Settings to Send Emails 2026
