Skip to Content
Mail Pilot

Mail Pilot

Mail Pilot replaces the WordPress default mail function with the Brevo transactional email service. It routes every outgoing message through the Brevo HTTP API (with an automatic SMTP fallback), records each send in a searchable log, and verifies delivery in real time through webhooks. The result is reliable transactional email and complete visibility over what your site actually delivers.

The plugin is designed for site owners and administrators who need to be sure that password resets, order confirmations, contact form replies, WooCommerce notifications and other system mail reach the inbox. It does not add marketing or campaign features: it focuses on the transactional layer of WordPress.

Highlights

  • Brevo API delivery. All wp_mail() calls are routed through the Brevo transactional API, which improves deliverability compared to the default PHP mail() function.
  • Automatic SMTP fallback. If the API call cannot be completed (for example because of a temporary network issue), the message is retried through Brevo SMTP so that mail is not lost.
  • Searchable email log. Every outgoing message is stored with recipient, subject, body, headers, status and timestamp. The log can be filtered by status and searched by recipient or subject.
  • Open and click tracking. When enabled, Brevo injects a tracking pixel and rewrites links so the plugin can record opens and clicks for each message.
  • Delivery verification via webhooks. Brevo posts back delivered, hard bounce, soft bounce, blocked, deferred and spam complaint events, which Mail Pilot reflects in the log entry.
  • Automatic cleanup. A scheduled WordPress cron task removes old log rows according to a configurable retention period so the database does not grow indefinitely.
  • Conflict prevention. Mail Pilot detects other SMTP plugins (in particular WP Mail SMTP) and warns when both would override wp_mail(), preventing duplicate or lost mail.
  • Resend and test. Any logged message can be resent from the admin page, and a built-in test email tool verifies the configuration.

Requirements

  • WordPress 6.0 or later.
  • PHP 7.4 or later (PHP 8.1+ recommended).
  • A Brevo account (the free plan is sufficient for typical transactional volumes).
  • A verified sender email address or authenticated sending domain in Brevo.
  • Outbound HTTPS access from the WordPress server to api.brevo.com on port 443, plus port 587 for the SMTP fallback.
  • WordPress cron (wp-cron) enabled, or a system cron task hitting wp-cron.php, for the cleanup job to run on schedule.

Installation

  1. Download the latest mail-pilot.zip from your account or the plugin download page.
  2. In the WordPress admin, open Plugins → Add New → Upload Plugin.
  3. Choose the ZIP file, click Install Now, then Activate Plugin.
  4. After activation, a new entry appears under Settings → Mail Pilot. The plugin also adds a top-level Mail Pilot menu that gives direct access to the log and statistics screens.

On activation Mail Pilot creates its custom database table ({prefix}_mail_pilot_logs) used to store the mail log. No emails are intercepted until the API key is saved and the integration is enabled.

Configuration

The configuration is split into three areas: the Brevo credentials, the sender identity, and the operational options for logging, tracking and retention. All settings live under Settings → Mail Pilot.

1. Create a Brevo account and API key

  1. Sign up at brevo.com  if you do not yet have an account. The free plan allows a generous volume of transactional email per day, which is enough for most small and medium sites.
  2. Log in to the Brevo dashboard.
  3. Open the user menu in the top right corner and choose SMTP & API.
  4. Select the API Keys tab and click Generate a new API key.
  5. Give the key a recognisable name (for example wordpress-mail-pilot) and copy the generated value. Brevo only shows the secret once; store it in a safe place.

2. Verify a sender

Brevo refuses to send messages from an unverified sender. Before saving the configuration in WordPress, make sure that either the sender email address or the whole domain is verified in Brevo:

  • For a single address, open Senders, Domains & Dedicated IPs → Senders in Brevo, add the address and confirm it via the email Brevo sends.
  • For a domain, open Senders, Domains & Dedicated IPs → Domains and follow the wizard that asks you to add the SPF, DKIM and DMARC DNS records. Domain authentication gives the best deliverability and is strongly recommended for production sites.

3. Enter the credentials in WordPress

  1. Open Settings → Mail Pilot in the WordPress admin.
  2. Paste the Brevo API key in the API Key field.
  3. Fill the Sender Name field with the name that will appear as the author of outgoing messages (for example the name of your site or shop).
  4. Fill the Sender Email field with the verified address from the previous step.
  5. (Optional) Set a Reply-To address if replies should go to a different mailbox than the sender.
  6. Click Save Changes.

After saving, the page displays a green indicator next to API status when the key is valid and the account can send. A red indicator means that the key was rejected; double-check that it was copied without trailing spaces and that the Brevo account is active.

Mail Pilot settings page
Mail Pilot settings page

4. Send a test email

Below the credentials section, the Send test email form lets you verify the configuration end to end:

  1. Enter the destination address (your own inbox is a good choice).
  2. Click Send test email.
  3. The plugin shows a success or error message immediately, and the message appears in the log within a few seconds.

If the test message reaches the inbox, the API integration is working. If it does not arrive within a couple of minutes, open the log entry and check the response details returned by Brevo, then consult the Troubleshooting section below.

5. Configure the delivery webhook

Open, click and delivery events are pushed back to WordPress by Brevo through a webhook. Setting it up is optional but recommended, because without it the log will only show that the message was accepted by Brevo, not whether it was actually delivered, bounced or opened.

  1. In Mail Pilot, copy the Webhook URL shown in the settings page. It points to the REST endpoint https://<your-site>/wp-json/mail-pilot/v1/webhook.
  2. In the Brevo dashboard, open Transactional → Settings → Webhook and click Add a new webhook.
  3. Paste the URL into the URL to call field.
  4. Select the events to report. The recommended set is:
    • Sent
    • Delivered
    • Hard bounce
    • Soft bounce
    • Blocked
    • Spam (complaint)
    • Opened (only if open tracking is enabled)
    • Clicked (only if click tracking is enabled)
  5. Save the webhook.

Brevo will start posting status updates to WordPress immediately. The log table refreshes the status column as events arrive.

6. Tracking, retention and cleanup

The lower part of the settings page exposes the operational options:

  • Enable open tracking. When on, Brevo embeds a 1x1 tracking pixel in the HTML body. The pixel is loaded by the recipient’s mail client, which counts as an open.
  • Enable click tracking. When on, links in HTML emails are rewritten to point at a Brevo redirector that records the click and then forwards the user to the original URL.
  • Log retention (days). Number of days after which log entries are removed by the cleanup task. The default is 30 days. Set it to 0 to keep entries forever (not recommended on busy sites).
  • Cleanup schedule. Frequency of the WordPress cron event that prunes the log. The default is daily.
  • Log message body. When off, only metadata (recipient, subject, status) is stored, which reduces database size and avoids storing the body of sensitive emails such as password resets.

Click Save Changes to apply.

Usage

Once the integration is enabled, Mail Pilot works transparently. Every call to wp_mail() made by WordPress core, themes or plugins is intercepted and rerouted through Brevo. No code change is required in WooCommerce, Contact Form 7, WPForms, BuddyPress or any other plugin that uses the standard WordPress mail API.

The dashboard

The Mail Pilot top-level menu opens a dashboard that summarises mail activity for the selected period: total sent, delivered, opened, clicked, bounced and blocked. The figures are updated as webhook events arrive.

Mail Pilot dashboard overview
Mail Pilot dashboard overview

The email log

The Log screen lists every message processed by the plugin, most recent first. Each row shows:

  • The recipient address (or the first address if several are present).
  • The subject.
  • The current status: queued, sent, delivered, opened, clicked, soft-bounce, hard-bounce, blocked, spam or error.
  • The timestamp of the last status change.
  • The Brevo message ID (used to correlate the entry with Brevo’s own logs).

Use the search box above the table to filter by recipient or subject, or the status dropdown to show only failing messages. Clicking a row opens the detail view, which exposes:

  • The full message headers and body (if body logging is on).
  • The list of recipients (To, Cc, Bcc).
  • Each tracked event with its timestamp.
  • The raw Brevo response, useful for support requests.

From the detail view you can click Resend to retry the message unchanged, or Copy to use it as the starting point for a new test message.

Statistics

The Statistics screen plots send volume and event counts over time. The default range is the last 30 days; the date range can be narrowed using the picker at the top of the page. Charts are available for:

  • Sent vs delivered messages per day.
  • Bounce and block rate.
  • Open and click rate on tracked messages.

The same screen lists the top recipients and the most common subjects, which is useful to spot a runaway plugin generating notifications, or a template producing high bounce rates.

Mail Pilot statistics screen
Mail Pilot statistics screen

Working with other plugins

Mail Pilot replaces the default wp_mail() implementation with its own PHPMailer extension. As a consequence it is incompatible with any other plugin that does the same, including WP Mail SMTP, Easy WP SMTP, Post SMTP, FluentSMTP and similar tools. The plugin detects the most common of these and shows an admin notice asking you to choose one mailer. The recommended path is to deactivate the other SMTP plugin and import its credentials into Mail Pilot if needed.

WooCommerce, BuddyPress, WPForms, Contact Form 7, Easy Digital Downloads and the WordPress core notifications continue to work without any change: they all go through wp_mail() and are therefore captured by Mail Pilot automatically.

Screenshots

The settings page concentrates the credentials, the test mailer and the operational options on a single screen, so a fresh install can be configured top to bottom without navigating away.

Mail Pilot settings page
Mail Pilot settings page

The dashboard surfaces the headline counters and the most recent activity, with one-click access to the detail of any individual message.

Mail Pilot dashboard overview
Mail Pilot dashboard overview

The statistics screen renders the delivery, open and click trends as charts, helping spot anomalies such as bounce spikes after a sender change or a domain reputation issue.

Mail Pilot statistics screen
Mail Pilot statistics screen

FAQ

Does Mail Pilot replace transactional emails only, or also marketing campaigns? It only handles transactional email, that is everything sent through WordPress’s wp_mail() function. Marketing campaigns created in the Brevo dashboard are managed there and not visible in the Mail Pilot log.

Do I have to pay for Brevo? No. The Brevo free plan currently includes a daily quota of transactional emails that covers most small and medium sites. If your volume grows, you can upgrade to a paid plan from within the Brevo dashboard without reinstalling the plugin.

Can I keep using WP Mail SMTP and Mail Pilot at the same time? No. Only one plugin can override wp_mail(); running two at the same time leads to duplicate sends, lost messages or PHP errors. Deactivate the other SMTP plugin before enabling Mail Pilot.

Are message bodies stored in the database? Only if Log message body is enabled in the settings. With the option turned off, the log keeps the recipient, subject, headers and status but not the body, which is preferable when sites send password resets or other sensitive content.

Will open tracking work with all email clients? Open tracking depends on the recipient loading remote images in their mail client. Many corporate clients and Apple Mail Privacy Protection block or pre-fetch the pixel, so open rates should be interpreted as a lower (or upper) bound, not as an exact figure.

Does the plugin support multiple sender addresses? The default sender is configured globally. Plugins or code that pass an explicit From: header to wp_mail() will use that address as long as it is verified in Brevo. Unverified addresses are rejected by the API.

Can I export the log? Yes. The log screen has an Export CSV button that exports the currently filtered view. The export contains recipient, subject, status, timestamps and Brevo message ID.

Where is the data stored? Logs are stored in a custom table called {prefix}_mail_pilot_logs in the WordPress database. Settings live in the standard WordPress options table. Nothing is sent to third parties besides Brevo itself.

Is Mail Pilot compatible with multisite? Yes. Each site in a multisite network keeps its own settings and log table, and uses its own Brevo API key. The plugin can also be network-activated.

Troubleshooting

The settings page shows “API key rejected”. Re-copy the key from Brevo, making sure there are no leading or trailing spaces. Confirm that the key has not been revoked or scoped down in the Brevo dashboard. Keys created for the v2 API may not work; generate a v3 key from the API Keys tab.

Test emails are reported as sent but never arrive. Open the log entry for the test message and check the Status and Brevo response sections. The most common cases are:

  • The recipient is on Brevo’s suppression list (previous bounce or unsubscribe). Remove the address from Contacts → Suppressed contacts in Brevo.
  • The sender or sending domain is not verified, so Brevo accepts the request but blocks the message.
  • The recipient mail provider has flagged the message as spam. Check the spam folder and review SPF, DKIM and DMARC for the sending domain.

Webhook events never reach the log. Verify that the webhook URL saved in Brevo matches the one shown in the Mail Pilot settings page, including the protocol (https) and any subdirectory of your install. WordPress must be reachable from the public internet; webhooks cannot be delivered to a site behind a VPN or to localhost. If you use a security plugin or a WAF, make sure that requests to /wp-json/mail-pilot/v1/webhook are not blocked.

Old log entries are not being deleted. The cleanup is triggered by WordPress cron. If your site has very low traffic, the cron may not fire often enough; configure a system cron task to call wp-cron.php once per hour. You can also trigger a manual cleanup with the Run cleanup now button at the bottom of the settings page.

A specific plugin’s emails are not being routed through Brevo. Check whether the plugin in question sends mail through its own SMTP implementation instead of wp_mail(). Plugins that bypass wp_mail() cannot be intercepted; consult their documentation to point them at the same Brevo credentials, or disable their custom mailer.

Switching to Mail Pilot caused emails to come from a different address. The sender address configured in Mail Pilot overrides the one that WordPress would otherwise use. To keep a per-plugin “From” address, make sure that plugin sets the From: header explicitly when calling wp_mail(); otherwise update the global sender in Settings → Mail Pilot to the desired value.

Last updated on