Muhammad Basim
WordPress

How to Set Up SMTP in WordPress, Step by Step

By Muhammad Basim·

Twenty minutes, once, and your site's email stops being a mystery.

The job is simple in principle: stop WordPress handing mail to your web server, and hand it to a service that exists to send mail properly. What follows is the actual sequence, including the two steps people skip that make the difference between "the test email worked" and "orders are reaching customers."

The short version

  1. Pick a transactional service and create an account
  2. Authenticate your domain with it — publish the DNS records
  3. Install an SMTP plugin and connect the two
  4. Set your From address to something real on your own domain
  5. Send the plugin's test email
  6. Test the actual flows — the step that matters

Step 1 — Choose a service

Your options fall into two groups.

Transactional providers — Postmark, Brevo, Mailgun, SendGrid, Amazon SES. Built for exactly this. Most have free tiers that comfortably cover a small site's transactional volume. Compared properly.

Your existing mailbox provider — Google Workspace or Microsoft 365 via their SMTP or API. Works, with limits worth knowing (below).

What to avoid: your web host's own SMTP server. It's usually the same infrastructure as PHP mail with an extra step, so you've changed the mechanism without changing the reputation problem.

For most sites, a dedicated transactional service on a free tier is the right answer.

Step 2 — Authenticate your domain

Do this before configuring the plugin. It's the step that determines whether your mail is authenticated to you or merely to your provider.

Your service will give you DNS records to publish — typically a CNAME or TXT for DKIM, and an SPF include.

Publishing them: in your DNS host's control panel — the company managing your domain's DNS, which may or may not be your web host.

Two things that catch people:

You can only have one SPF record. If you already have one, add your provider's include: to the existing record rather than creating a second. Two SPF records is a permanent error, and it breaks everything rather than just the new sender.

Watch the 10-lookup limit. Each include: triggers a DNS lookup, and each of those can trigger more. Add a transactional provider to a domain already running a CRM, a helpdesk, and a newsletter tool, and you can quietly cross the line.

Then verify in your provider's dashboard. Most show authentication status directly, and DNS propagation usually takes minutes.

The records explained.

Step 3 — Install and connect the plugin

WP Mail SMTP is the most widely used. FluentSMTP is free with no paid tier and includes logging. Post SMTP includes logging and failure alerts.

Any of them work. The plugin is a connector; your sending service does the actual work.

Configuration depends on whether you use an API or SMTP credentials:

API (preferred where available). You paste an API key from your provider. Faster, more reliable, and better error reporting than SMTP.

SMTP credentials. Host, port, encryption, username, password. Use port 587 with TLS as the default — port 465 with SSL also works, and port 25 is usually blocked by hosts and shouldn't be used.

Where to store credentials: several plugins let you define them as constants in wp-config.php rather than saving them in the database. That's meaningfully safer — a database dump or a compromised admin account doesn't hand over your sending credentials. Worth doing if your plugin supports it.

Step 4 — Set the From address properly

More consequential than it looks, and a common cause of continued failures after an otherwise correct setup.

The From address must be on your own authenticated domain. [email protected] or [email protected].

Two things not to do:

Don't use a free-mail address. [email protected] as your site's From address means your server is claiming to send as Gmail — which fails DMARC outright, because Gmail publishes a policy and your server isn't authorised.

Don't leave the WordPress default. [email protected] is what WordPress uses if you don't set one, and that mailbox usually doesn't exist. Mail from a non-existent address is a negative signal, and bounces have nowhere to go.

Set "Force From Address" in your plugin. Some plugins and themes override the From address per-message, and forcing it ensures consistency — which matters because inconsistent From addresses fragment your sending reputation.

Make it a real mailbox that you can receive replies at. Someone will reply to an order confirmation.

Step 5 — Send the test email

Every SMTP plugin has a test function. Use it, and confirm the email actually arrives.

If it fails, the error usually names the cause:

Authentication failed — wrong API key or credentials.

Connection refused or timed out — your host may be blocking the port. Try the API method instead, or port 465.

Sender not verified — you haven't completed domain authentication with the provider, or DNS hasn't propagated.

If it succeeds but lands in spam, your SMTP is working and you have a separate deliverability problem — usually incomplete authentication or DMARC alignment. That's here.

Step 6 — Test the actual flows

The step people skip, and the reason "I set up SMTP but emails still aren't arriving" is such a common complaint.

The plugin's test email proves the plugin can send. It doesn't prove that WooCommerce, your form plugin, or your membership plugin are using it — some plugins send mail through their own mechanisms that bypass wp_mail() entirely.

Test each one for real:

  • Password reset — request one for a test account
  • WooCommerce — place a test order and check the customer confirmation and the admin notification
  • Contact form — submit it and confirm the notification arrives
  • User registration, if you have it
  • Any membership or booking plugin

Check spam folders too. Arriving in spam is a different result from arriving, and you need to know which you got.

Test to more than one provider. Send to a Gmail address, an Outlook address, and a business domain if you can. Providers differ, and mail can arrive at one and fail at another.

Is Gmail SMTP good enough?

For low volume, it works — with caveats worth knowing.

Google Workspace has sending limits that apply to SMTP relay, and a busy store can hit them. Exceeding them can temporarily suspend sending, which is a bad way to find out.

Free Gmail accounts are not suitable. Lower limits, and you'd be sending from a @gmail.com address, which fails alignment.

It's a shared reputation with everything else Google sends.

The practical position: Google Workspace SMTP is acceptable for a small brochure site with a contact form and occasional password resets. For a store, a membership site, or anything where a missed email costs money, use a dedicated transactional service — it's built for this, the free tiers usually cover you, and you get proper logging.

Do you need a paid service?

Usually not, at small volume.

Most transactional providers offer free tiers that comfortably cover a typical small site's needs — form notifications, password resets, and modest order volume.

When you'd pay: higher volume than the free tier allows, longer log retention, dedicated IPs, or support commitments.

Check current free-tier limits directly with each provider rather than trusting figures in an article — they change, and a stale number here would send you to the wrong place.

Turn on logging

Before you consider this finished.

Most SMTP plugins include email logging, and it converts "did that email send?" from a mystery into a lookup. When a customer says they never received a confirmation, you can check whether it was sent, when, and to which address — and the answer is often a typo at checkout rather than a system failure.

Set a retention period. Logs contain personal data; thirty days is usually plenty, and most plugins can prune automatically.

Your provider's dashboard also holds delivery data, often including bounces, which is more authoritative than your site's own record.

Frequently asked questions

Is Gmail SMTP good enough?
For a small brochure site with a contact form and occasional password resets, yes. Google Workspace SMTP relay works, but it carries sending limits that a busy store can hit, and exceeding them can temporarily suspend your sending. Free Gmail accounts aren't suitable at all, since you'd be sending from a @gmail.com address that fails DMARC alignment. For stores or anything where a missed email costs money, use a dedicated transactional service.

Do I need a paid SMTP service?
Usually not at small volume. Most transactional providers offer free tiers that comfortably cover a typical site's password resets, form notifications, and modest order volume. You'd pay for higher volume, longer log retention, dedicated IPs, or support commitments. Check current free-tier limits directly with each provider, since they change regularly.

How do I test WordPress email?
Start with your SMTP plugin's built-in test, which proves the connection works. Then test the actual flows separately — request a password reset, place a test order, submit your contact form — because some plugins send mail through their own mechanisms that bypass the SMTP configuration entirely. Send to at least two different providers, check spam folders, and turn on email logging so you have a record when something goes wrong later.

What to do next

Check your current From address before anything else. In WP Mail SMTP or your equivalent, look at what's set — if it's [email protected] and that mailbox doesn't exist, that alone is costing you delivery.

Then, once SMTP is configured, place a real test order or request a real password reset. The plugin's own test proves the plugin works; only the real flow proves your site does.

Free: The 60-Minute Email Authentication Fix.


Related guides

Join the Newsletter

Get practical marketing tactics delivered straight to your inbox.

Muhammad Basim

Written by

Muhammad Basim

Related Articles

Newsletter

Free: The 60-Minute
Email Authentication Fix

A no-fluff checklist from the Deliverability Playbook. In one hour: set up SPF, DKIM & DMARC correctly, check your domain against blocklists, and pass Gmail & Yahoo's 2026 sender requirements.

No spam — that would be ironic. Unsubscribe anytime.