sandywp / plugins / custom-smtp

Custom SMTP

Email Deliverability – FREE & Easy-to-use

5.0 out of 5 stars. 5.0 1 reviews

WordPress can't send email reliably on its own. Send through your SMTP provider, log every message, get alerts when sending breaks. Free, no upsell.

Launch a sandbox with this plugin → No signup.
Ready in seconds.

v2.7.5 100+ installs WP 6.0+ PHP 7.4+

your-sandbox.sandywp.com/wp-admin
Custom SMTP: Email Deliverability – FREE & Easy-to-use running inside a SandyWP sandbox

What you get inside

5 screens
  • Email Logs - every email is logged with its delivery status, and failed sends show the exact SMTP error. Search, filter by status or date, and export to CSV.

  • SMTP Settings - pick a provider preset (Gmail, Brevo, SendGrid and more), fill in your credentials and you are done. The status bar confirms email delivery is…

  • Email Preview - click any logged email to read its full content in an Outlook-style sidebar, without sending anything again.

  • Unusual Usage Alerts - get warned by email, webhook or admin notice when sending spikes or delivery failures pile up. Every threshold is yours to tune.

  • Test tools - check your configuration in one click: test the SMTP connection or send yourself a real test email.

About this plugin

Make your WordPress email arrive

WordPress still hands your email to the PHP mail() function. Most hosts have switched it off or throttled it because spammers loved it, and where it still runs, unauthenticated mail lands in spam. If your contact form says thank you and nothing ever arrives, this is why.

Custom SMTP sends your email through the provider you already use instead: your host’s SMTP server, Gmail, Outlook, Brevo, SendGrid, Mailgun, Postmark or the Amazon SES API. It logs every message with its outcome, lets you preview and resend failures, and alerts you when sending spikes or starts failing. Everything is in the free plugin: no account to create, no third-party relay, no pro version.

Built for modern WordPress: WordPress 7.0 ready, PHPMailer 7.0.2 compatible, stateless / cloud-ready (Docker, Kubernetes), and fully translated in English and French.

Documentation lives at customsmtp.com/docs/, with step-by-step guides for twelve providers and a developer guide covering constants, environment variables and the Amazon SES API.

Send through your own SMTP provider

Point the plugin at the server you already pay for or the free tier you already use, with a preset that fills the technical values for you:

  • Presets for twelve providers: Gmail, Outlook, Amazon SES, SendGrid, Mailgun, Brevo, Postmark, Mailjet, Zoho, Yahoo, iCloud and Scaleway, plus “Other / Custom” for any SMTP server.
  • From Name and From Email applied to every outgoing email, with optional Reply-To, CC and BCC.
  • SSL/TLS encryption, and optional authentication for relay servers that need none.
  • Password encrypted at rest (AES-256-CBC with your WordPress salts), never displayed back in the form.
  • Test without guessing: test the SMTP connection without sending anything, or send yourself a real test email.

A log of every email, with preview and resend

Never wonder if your emails were sent again. Logging works out of the box and captures every message going through wp_mail(): WooCommerce order notifications, contact form submissions, password resets, all of it.

  • Delivery status (sent or failed) with the exact SMTP error when a message fails, and the stored headers for advanced troubleshooting.
  • Preview the email body in wp-admin, in an Outlook-style sidebar, without sending anything again; view the HTML source, or download any email as an HTML file for archiving.
  • Resend a failed email straight from the logs once your configuration is fixed.
  • Search by recipient, subject or status; filter by date range; export to CSV for reporting and compliance.
  • Configurable retention with automatic purge (30 days by default), and content storage you can switch off in one click.

Unusual Usage Alerts

A compromised contact form or a runaway plugin can turn your site into a spam relay, and a revoked password or an exhausted provider quota can stop your emails silently. Custom SMTP watches for both and warns you.

  • Sending spikes — get an email when more messages than expected go out within an hour or a day. Thresholds are absolute, never relative, so a quiet site that sends a handful of emails a week is never woken up by statistical noise.
  • Delivery failures — get warned as soon as several emails fail in a row, or when too many of the last messages sent failed. Counted over the last emails sent rather than over a period of time, so it works just as well on a site that sends twice a week as on a busy store.
  • A channel that survives the outage — alerts go out by email, to an optional HTTPS webhook (Slack, Teams, any JSON endpoint), and to a persistent notice in wp-admin, because the one moment you need the alert is the moment email itself is broken.
  • No noise — a configurable cooldown keeps an ongoing incident from filling your inbox, and the alert email is never logged nor counted against your own thresholds.
  • Off by default — turn it on in Settings and set the thresholds that match your site.

Manage WordPress Notifications

WordPress sends a handful of emails on its own, and some of them get old fast: a notice to the administrator every single time a user resets their password, a report after every automatic plugin update, a message for every comment awaiting moderation. Switch off the ones you do not want, one checkbox each, no code.

  • Password reset and new user notices to the administrator — the user still gets their reset link and their welcome email, only the copy to the admin stops.
  • Automatic update reports — core, plugins and themes, separately.
  • Comment notifications — awaiting moderation, and new comment to the post author.
  • Nothing is hidden from you — a notification you switch off is never created, so it will not appear in the Email Logs either, and the screen tells you that.
  • Account recovery is never at risk — the emails users need to regain access to their account are deliberately out of reach of this screen.
  • Off means off, on stays on — installing or updating the plugin never silences an email your site was already sending.

Deliverability, privacy, security

  • Cooperates with the automatic Envelope-From / Return-Path behavior introduced in WordPress 6.9, which improves SPF, DKIM and DMARC alignment on strict hosts (Amazon SES, Postmark, etc.).
  • UTF-8 and emoji handled end-to-end in subjects, bodies and headers.
  • All data stays in your WordPress database: no third-party calls, no telemetry, and no external processor to declare in your GDPR records.
  • Email preview rendered in a sandboxed iframe, so no JavaScript from a logged email ever runs in wp-admin.
  • All admin actions protected with nonces and capability checks; the SMTP password is encrypted at rest.

For developers: containers, config-as-code, Amazon SES API

The developer guide covers this surface in depth; the short version:

  • Stateless and cloud-ready: no filesystem writes, no shared storage, safe on read-only filesystems. Works on Docker, Kubernetes, AWS ECS/Fargate, Google Cloud Run, and with Bedrock or Trellis stacks.
  • Every setting from a constant or environment variable: define CUSTOM_SMTP_<SETTING> and it overrides the saved value everywhere, with the field shown read-only in wp-admin and a badge naming the variable. On Multisite, a network-wide option can configure every site at once.
  • Amazon SES API with IAM roles: send through the SESv2 API authenticated by your ECS task role or EC2 instance role, with no access keys and no stored credentials. Raw MIME preserves HTML, attachments, CC/BCC, Reply-To and custom headers, and it works with or without the AWS SDK for PHP. Details in the FAQ below.
  • Abilities API (WordPress 6.9+): custom-smtp/connection-health and custom-smtp/send-test-email are exposed to MCP-enabled AI assistants and automation tools (n8n, Make), behind the same manage_options capability check as wp-admin.

Questions

Where do I find the documentation?

On customsmtp.com/docs/, which covers every screen and setting of the plugin. Each provider preset also has its own step-by-step guide, with the exact values the preset fills in. The developer guide goes further: forcing any setting from a PHP constant or an environment variable, running on immutable or containerized WordPress, and sending through the Amazon SES API with an IAM role.

For anything not covered there, the support forum on this page is the right place to ask.

What SMTP settings should I use?

Custom SMTP includes presets for popular providers (Gmail, Outlook, AWS SES, SendGrid, etc.). Just select your provider and settings are auto-filled.

List of SMTP Servers

Here’s a reference list of common SMTP servers:

Professional Email Services
* SendGrid: smtp.sendgrid.net – TLS – Port 587
* Mailgun: smtp.mailgun.org – TLS – Port 587
* Amazon SES: email-smtp.[region].amazonaws.com – TLS – Port 587
* Brevo (Sendinblue): smtp-relay.brevo.com – TLS – Port 587
* Postmark: smtp.postmarkapp.com – TLS – Port 587
* Mailjet: in-v3.mailjet.com – TLS – Port 587
* Scaleway: smtp.tem.scaleway.com – TLS – Port 587

Consumer Email Providers
* Gmail: smtp.gmail.com – TLS – Port 587
* Outlook/Office365: smtp.office365.com – TLS – Port 587
* Yahoo Mail: smtp.mail.yahoo.com – TLS – Port 587
* iCloud: smtp.mail.me.com – TLS – Port 587
* Zoho: smtp.zoho.com – TLS – Port 587
* AOL: smtp.aol.com – TLS – Port 587
* GMX: smtp.gmx.com – SSL – Port 465

ISP Email (Regional)
* Comcast: smtp.comcast.net – Port 587
* Verizon: outgoing.verizon.net – SSL – Port 465
* AT&T: smtp.mail.att.net – SSL – Port 465
* Orange: smtp.orange.net – Port 25
* T-Online: securesmtp.t-online.de – TLS – Port 587
* 1&1 IONOS: smtp.1and1.com – TLS – Port 587

Note: Settings may vary. Contact your provider for exact configuration.

Does it work with WooCommerce?

Yes! Custom SMTP logs all emails sent from WordPress, including WooCommerce order confirmations, shipping notifications, and customer emails.

Is it compatible with contact form plugins?

Yes, it works with Contact Form 7, WPForms, Gravity Forms, and any plugin that uses WordPress wp_mail() function.

Is it compatible with stateless/containerized WordPress?

Yes. Custom SMTP is fully stateless-compatible and works on ephemeral infrastructure (Docker, Kubernetes, AWS ECS/Fargate, Google Cloud Run, etc.) without shared storage like EFS or NFS.

The plugin stores all data in the WordPress database:

  • Settings in wp_options
  • Email logs in a custom database table
  • CSV exports streamed directly to the browser (no temp files)
  • Log purge scheduled via WP-Cron (database-backed)

It also works with modern WordPress stacks like Bedrock and Trellis, and can run on a read-only filesystem.

Notes for stateless deployments:

  • Ensure WordPress salts (LOGGED_IN_KEY, LOGGED_IN_SALT) are consistent across all instances — the SMTP password encryption depends on them.
  • If DISABLE_WP_CRON is set to true, configure an external cron to trigger wp-cron.php so automatic log purge runs properly.
  • On AWS, prefer the Amazon SES (API) mailer with an IAM role (see the SES question below) — it removes the need to store any SMTP credentials at all.

Can I send through Amazon SES without storing any credentials?

Yes. Custom SMTP includes an Amazon SES (API) mailer that authenticates through your AWS IAM role (the ECS task role or EC2 instance role) using the AWS default credential chain. You never enter or store an access key, secret key, or SMTP credential — ideal for stateless, containerized WordPress on AWS ECS/Fargate.

In Settings > Custom SMTP, choose “Amazon SES (API · IAM role)” as the mailer, set the region and a verified sender address (or inject them as environment variables), and you’re done. You can also provide a SES Configuration Set for bounce/complaint tracking, and “Send Test Email” returns the SES MessageId so you can confirm the send on the AWS side.

The following environment variables / PHP constants take priority over the saved settings, so the same container image works across environments:

  • SES_REGION (falls back to AWS_REGION) — e.g. eu-west-3
  • SES_FROM_EMAIL — the verified sender address
  • SES_CONFIG_SET — optional SES configuration set

The message is sent as raw MIME, so HTML, attachments, CC/BCC, Reply-To and custom headers are all preserved. The mailer works whether or not the AWS SDK for PHP is installed (it falls back to a built-in signed API client), and SES sends are logged in the Email Logs like any other email.

This is different from the existing Amazon SES SMTP preset, which uses SMTP credentials — the new mailer uses the SES API and your IAM role instead.

Can I configure everything from environment variables (config-as-code)?

Yes. Every setting can be forced from a PHP constant or environment variable, which takes priority over the value saved in the database — ideal for immutable Docker images and DISALLOW_FILE_MODS deployments.

Use CUSTOM_SMTP_<SETTING> in uppercase, for example:

  • CUSTOM_SMTP_MAILER_TYPEsmtp or ses_api
  • CUSTOM_SMTP_HOST, CUSTOM_SMTP_PORT, CUSTOM_SMTP_SECURE, CUSTOM_SMTP_USERNAME, CUSTOM_SMTP_PASSWORD
  • CUSTOM_SMTP_MAILFROM, CUSTOM_SMTP_FROMNAME, CUSTOM_SMTP_LOG_RETENTION
  • CUSTOM_SMTP_ALERTS_ENABLED, CUSTOM_SMTP_ALERT_EMAIL, CUSTOM_SMTP_ALERT_WEBHOOK, CUSTOM_SMTP_ALERT_MAX_PER_HOUR, CUSTOM_SMTP_ALERT_MAX_PER_DAY, CUSTOM_SMTP_ALERT_COOLDOWN

The Amazon SES shortcuts also apply: SES_REGION (or AWS_REGION), SES_FROM_EMAIL, SES_CONFIG_SET.

An empty value counts as “not set”, so it never overrides anything. To force a boolean setting off, give it an explicit value: CUSTOM_SMTP_ALERTS_ENABLED=false (or 0), not an empty string.

To switch an entire Multisite network to Amazon SES with no database changes, set in your container: CUSTOM_SMTP_MAILER_TYPE=ses_api, SES_REGION=eu-west-3, [email protected].

Values are resolved from PHP constants, then getenv(), $_ENV, and $_SERVER. The $_SERVER source means FrankenPHP (including worker mode) and Bedrock-style stacks work with plain environment variables — no constants required.

On Multisite, the plugin also reads a network-wide option (via get_site_option) beneath any per-site option, so a single configuration can apply to all sites. Fields supplied by the environment are shown read-only in the settings page with a badge naming the source variable. (A password supplied via CUSTOM_SMTP_PASSWORD is used as-is; only stored passwords are encrypted at rest.)

5.0

1 reviews

  • 5 ★ 1
  • 4 ★ 0
  • 3 ★ 0
  • 2 ★ 0
  • 1 ★ 0

Ratings come from WordPress.org. SandyWP does not collect its own reviews.

sandywp / also on the shelf

Try another plugin

Spin up a real WordPress site in seconds.

Test plugins, build a demo, hand a client a link — then squash it and start again. No local setup, no Docker.