SMTP
v1.2.0Send every WordPress email through a real SMTP server so it actually lands — and keep a full, searchable log of everything that goes out.
Overview
The SMTP module routes all WordPress email through the mail server you choose, then records each message in a built-in log.
By default WordPress hands email to the server’s built-in PHP mail() function, which most hosts either block or send straight to spam. This module points wp_mail() at a proper SMTP server — your Google Workspace, Microsoft 365, SendGrid, Mailgun, Amazon SES, Brevo or Postmark account — so password resets, order emails, form notifications and everything else are delivered reliably and authenticated from your own domain.
- Route all WordPress email through any SMTP provider
- Pick from 19 built-in mailers (Gmail, Microsoft 365, SendGrid, SES…) that fill in the settings for you
- Set the From address and name once, and optionally force them everywhere
- A full email log — status, transport, headers and a rendered preview
- A Statistics tab with a per-day graph of what’s sent and what fails
- A one-click test email that tells you exactly what went wrong
- Keeps the password out of the database with a wp-config constant
mail(). Sending through authenticated SMTP is the single biggest fix for missing WordPress email.Requirements & compatibility
It runs on any WordPress site — you only need an SMTP account to send through.
| Requirement | Minimum | Recommended |
|---|---|---|
| WordPress | 6.0 | 6.5 or newer |
| PHP | 7.4 | 8.1 or newer |
| SMTP account | Any SMTP host | A dedicated sending service (SendGrid, SES, Mailgun…) |
| Outbound port | 587 or 465 open | Confirm your host allows outbound SMTP |
Choose your mailer
Nineteen mailers are built in — pick one and its SMTP host, port and encryption are filled in for you; you only add the login.
Every mailer is an SMTP preset, so you keep one simple, reliable transport no matter who delivers your mail. Selecting a provider also shows the exact credential it expects — an app password, an API key or a token.
| Mailer | What you’ll need |
|---|---|
| Google / Gmail | An App Password (with 2-Step Verification on) |
| Microsoft 365 / Outlook | A mailbox with SMTP AUTH, or an app password |
| Amazon SES | SES SMTP credentials (set your region in the host) |
| SendGrid | Username apikey and your API key |
| Mailgun | The domain’s SMTP username and password |
| Brevo | Your login plus an SMTP key |
| Postmark | A Server API token (used as both user and password) |
| Zoho · SMTP2GO · SparkPost · Mailjet · MailerSend · Resend · Elastic Email · SendLayer · SMTP.com · Mandrill | Their SMTP username or API key |
| Other SMTP | Any host, port, encryption and login you enter yourself |
mail(). Pick any real provider to switch SMTP on.Installation & activation
SMTP ships inside WPStack — switch it on, pick your provider, and send a test.
Activate the module
In WPStack → Modules, flip SMTP on. An SMTP item appears in the WPStack menu.
Pick your provider
Go to WPStack → SMTP and choose your mailer — Gmail, Microsoft 365, SendGrid, Amazon SES and more. The host, port and encryption are filled in for you; just add your username and password.
Save & send a test
Click Save settings, then use Send a test email. A green banner confirms it went through SMTP.
mail() — messages may be logged as “sent” but never actually arrive. Choosing any provider turns SMTP on; the settings screen shows an amber banner while it’s inactive.Connecting your SMTP server
Pick your provider from the mailer grid and its host, port and encryption are filled in automatically — you only add your login.
| Setting | Type | Default | What it does |
|---|---|---|---|
| Mailer | picker | Default (none) | Choose a provider to auto-fill its SMTP host, port and encryption — or “Other SMTP” for a custom server. |
| SMTP host | text | — | Your provider’s server, e.g. smtp.gmail.com or smtp.sendgrid.net. |
| Port | number | 587 | 587 with TLS · 465 with SSL · 25 with no encryption. |
| Encryption | select | TLS | None, SSL or TLS — match it to the port your provider expects. |
| Authentication | toggle | on | Log in with a username & password (almost always required). |
| Username | text | — | Usually your full email address, or an API-key username like apikey. |
| Password | password | — | App password or API key. Stored in the database, or set via a wp-config constant. |
| From email | — | The address every message is sent from — use one on your own domain. | |
| From name | text | — | The sender name shown in the inbox, e.g. your site or business name. |
| Force From | toggle | on | Always apply the From above, overriding what other plugins set. |
The email log
Every message WordPress sends is recorded, so you can prove what went out and why anything failed.
| Date | Status | Via | To | Subject |
|---|---|---|---|---|
2026-07-24 18:08:55 | sent | SMTP | owner@example.com | New Booking – Spa on 29/07/2026 |
2026-07-24 18:08:54 | sent | SMTP | jane@example.com | Booking Confirmed – Spa |
2026-07-24 04:19:19 | sent | SMTP | jane@example.com | New Booking – Spa on 29/07/2026 |
2026-07-24 04:08:18 | sent | SMTP | admin@example.com | Password reset request |
2026-07-24 04:07:50 | failed | SMTP | admin@example.com | Password reset request |
2026-07-24 04:01:23 | sent | SMTP | admin@example.com | Password reset request |
- One row per email with a sent or failed status and the exact error on failure.
- A Via column shows the transport — SMTP (delivered) or PHP mail (built-in, usually not delivered).
- Open any row for the full detail: from, to, cc/bcc, subject, headers and a rendered HTML preview.
- Turn logging on or off, and set how many days to keep — old rows are pruned automatically each day.
- Clear log empties it in one click.
Email statistics
The Statistics tab turns your log into a per-day picture of what’s going out — and what’s failing.
- A line chart of emails per day — sent (green) against failed (red).
- Headline totals: total, sent, failed and your delivery rate.
- Switch the window between the last 7, 30 or 90 days.
- A Top subjects table showing which emails send most — and which fail.
Keeping the password safe
For extra safety you can keep the SMTP password out of the database entirely.
Define WPSTACK_SMTP_PASS in wp-config.php. When present it takes precedence over the stored value, the password field is hidden in the admin, and the secret never lives in the database or a backup.
// Keep the SMTP password out of the database
define( 'WPSTACK_SMTP_PASS', 'your-app-password-or-api-key' );Frequently asked questions
Yes — this module sends through a mail server, so you need SMTP credentials from a provider (your email host, Google, Microsoft, SendGrid, SES, Mailgun and so on). It doesn’t send mail on its own.
Check the email log’s Via column. If it says “PHP mail”, SMTP isn’t active — enable it and set a host. If it says “failed”, the row shows the exact error, usually a wrong port, encryption or password.
It configures the standard wp_mail() pipeline, so any plugin that sends through WordPress is routed automatically. Run only one SMTP plugin at a time to avoid conflicting From settings.
Yes — subject, headers and the message body (capped so large emails can’t bloat the table), with an HTML preview in the detail view. Set a retention window to auto-delete old rows.
You can store it in the database, or define WPSTACK_SMTP_PASS in wp-config.php so it never touches the database. Use a provider app password or API key rather than your main login.
Use 587 with TLS for most providers, or 465 with SSL if needed. Port 25 (no encryption) is widely blocked and best avoided.