WP Instances

Mail

Sites in WP Instances never send real email. Every message is caught on your PC and shown in WP Instances: password resets, order emails, form notifications. Nothing reaches a real inbox, whatever address it was sent to.

That makes it safe to restore a live shop or membership site: it can't email the live site's customers.

Where to see emails

Place What it shows
Overview tab, Mail section The latest emails this site sent, unread ones marked. Click one to open it.
Mail tab (key 4) All of this site's caught emails, with sender, recipients and a preview.
Open inbox The full inbox in your browser, filtered to this site.
mail :8025 in the status bar The inbox for all sites.

The inbox is Mailpit, running at http://127.0.0.1:8025. It only accepts connections from this computer. If another program uses port 8025 when WP Instances starts, the inbox moves to the next free port by itself; the status bar shows the current one.

In the inbox you can see each message's HTML version, plain text, headers, attachments and raw source. It also checks HTML compatibility across email clients and flags broken links. All sites share one inbox; filter by tag there to see one site. It keeps up to 5000 messages.

Send a test email

Click Send test email on the Overview tab or the Mail tab. It sends a message through the site's own wp_mail() to test@example.com, with the subject Test email from WP Instances. It appears in the list a moment later.

If the test arrives, catching works. If an email from a plugin still doesn't appear, the plugin isn't sending; check its settings or the Debug console.

How it works

WP Instances adds a must-use plugin, 0-wpx-mailcatch.php, to every site. It's installed again whenever WP Instances starts and after each create, import or duplicate, so a restored backup can't remove it.

  • It handles WordPress' wp_mail() itself and delivers every message to the local inbox, tagged with the site's name.
  • SMTP and mail plugins such as WP Mail SMTP, FluentSMTP and Post SMTP keep their settings, but their mail is delivered to the inbox too. FluentSMTP may show a notice that wp_mail() is already defined; that's expected.
  • The PHP containers can't send mail any other way, so PHP's raw mail() sends nothing.

Code that skips WordPress and calls an email service's API directly (for example SendGrid's) isn't caught by the plugin.

The Mail tab's Details section shows the inbox address, the SMTP server sites use (mailpit:1025, inside Docker), the site's tag and where the catcher plugin is.