WP Manifestindependent plugin directory
manifest / email / mail-inspector

Mail Inspector

Diagnose, monitor, and troubleshoot outgoing emails. Features include SMTP presets, SMTP Connection Tester, Failure Reason Analyzer, DNS Health Scanner, and email retry queue.

★ 0stars

Install

Download source zip No release zip yet

This is the repository archive. It installs, but the folder name will carry the branch suffix and updates will not flow.

Install straight from GitHub with WP-CLI:

wp plugin install https://github.com/a4ashishjangid/mail-inspector/archive/refs/heads/main.zip
No built-in updater. New versions won't appear under Dashboard → Updates. Install new releases yourself, or let Git Updater track the repository.

Mail Inspector is a stable, lightweight, and highly reliable deliverability diagnostics, monitoring, and troubleshooting tool for WordPress. Designed with a diagnostics-first philosophy, it helps administrators quickly pinpoint exactly why outbound emails are failing, going to spam, or not sending at all.

Unlike traditional SMTP plugins that focus solely on email routing, Mail Inspector is a comprehensive troubleshooting suite. It intercepts the WordPress outbound mail system, providing deep debugging data, a step-by-step connection tester, real-time DNS checks, and a lightweight email retry queue.


🚀 Upgrade to Mail Inspector Pro

Take your email deliverability and troubleshooting to the next level with Mail Inspector Pro. The Pro version unlocks advanced capabilities designed for high-volume sites, eCommerce stores, and agencies.

Pro Exclusive Features:

  • Inbox Sandbox Mode: Capture and inspect outgoing emails safely without actually sending them to the recipients. Perfect for staging environments and safely testing live automations!
  • Advanced Source Detection: Instantly identify exactly which plugin or theme triggered an email (e.g., WooCommerce, Sucuri, WPForms) using advanced call stack backtracing.
  • Premium Pro Inbox: A sleek, modern multi-row card feed to effortlessly view, search, and replay captured emails.
  • WooCommerce Template Inspector: See exactly which WooCommerce templates are being used for your transactional emails, and if your active theme is overriding them.

Need Pro Support or want to upgrade? Contact our dedicated Pro team at a4ashishjangid@gmail.com or visit our official website to grab your Pro license!


🌟 Core Features & Functionalities

1. SMTP Connection Tester

A flagship diagnostic tool separate from simple test sending. When triggered, it executes a low-level socket diagnostic sequence to isolate where a connection is dropping:

  • DNS Resolution: Checks if the mail server hostname resolves and measures resolution time.
  • Socket Connectivity: Verifies if the SMTP port is reachable from your hosting environment.
  • TLS Negotiation: Checks crypto handshake status.
  • SMTP EHLO Greeting: Verifies that the remote SMTP server accepts command greetings.
  • Authentication: Tests the validity of SMTP logins. It displays pass/fail indicators for each step, performance timings, and prints the raw PHPMailer transaction log trace.

2. Failure Reason Analyzer

Translates technical SMTP error codes into clear, actionable advice:

  • Authentication Failures (535): Flags incorrect SMTP credentials or missing Gmail App Passwords (if Google 2FA is active).
  • Connection Timeouts (110/111): Detects firewall blocks on outgoing ports (like 25 and 587) by hosting providers and suggests trying port 465 (SSL).
  • DNS Resolution Fails: Identifies typos in mail server hostnames.
  • SSL/TLS Handshake Failures: Identifies port and encryption method mismatches.
  • Sender Rejections (550): Warns that the "From" address does not match verified domains on Brevo/SES.

3. Email Source Detection

Uses stack trace checks (debug_backtrace) to identify which component initiated the email request. It maps the calling files to show if it originated from:

  • WooCommerce
  • Contact Form 7
  • WPForms
  • Gravity Forms
  • Fluent Forms
  • WordPress Core
  • Active Themes
  • Custom Third-Party Plugins

4. Background Email Retry Queue

A lightweight automatic background retrying engine:

  • Failed outgoing emails are held in the queue.
  • A custom WP-Cron schedule (every_fifteen_minutes) runs automatically every 15 minutes to retry pending emails.
  • Exponential Backoff: Subsequent retries are delayed dynamically (calculated as 300 * (2 ^ (attempt - 1)) seconds, e.g. 5 minutes for attempt 1, 10 minutes for attempt 2, 20 minutes for attempt 3, etc.) to prevent hitting provider rate limits.
  • Once a retried email succeeds, it updates the original log entry to success instead of writing duplicate rows, maintaining clean statistics.
  • Includes manual "Retry Now" triggers (both individual and bulk retry options).

5. Email Health Score & DNS Scanner

Computes a real-time deliverability score out of 100 based on standard weights:

  • Active SMTP Mailer configuration (+30 points)
  • SPF Record presence and validity (+20 points)
  • DKIM Record presence (+15 points)
  • DMARC Record validation (+15 points)
  • SSL/HTTPS active state on site (+10 points)
  • Deliverability success rate from database logs (+10 points)

If records are missing, it provides copy-to-clipboard DNS TXT strings tailored to the active mailer.


🛠️ Step-by-Step How-To Guides

1. How to Configure SMTP Presets

Go to Mail Inspector > Settings in your WordPress sidebar:

A. Gmail SMTP (App Passwords)

  1. Set the Active Mailer dropdown to Gmail SMTP.
  2. Enter your Gmail address in the Gmail Email Address field.
  3. Generate a Gmail App Password:
    • Go to your Google Account Settings.
    • Go to Security and enable 2-Step Verification (if not already active).
    • Search for App Passwords, generate a new one for "Mail", and copy the 16-character code.
  4. Paste the 16-character code into the Gmail App Password field in Mail Inspector.
  5. Click Save Settings.

B. Brevo SMTP

  1. Set the Active Mailer dropdown to Brevo SMTP.
  2. Enter your Brevo SMTP login in the Brevo SMTP Username field.
  3. Retrieve your Brevo SMTP Master Key/Password from your Brevo Dashboard (under SMTP & API settings).
  4. Paste it into the Brevo SMTP Password field in Mail Inspector.
  5. Set the Port (usually 587) and Encryption type (TLS).
  6. Click Save Settings.

C. Amazon SES SMTP

  1. Set the Active Mailer dropdown to Amazon SES.
  2. Enter your SMTP endpoint host corresponding to your AWS region (e.g. email-smtp.us-east-1.amazonaws.com) in the SES SMTP Host field.
  3. Create SMTP credentials from your AWS SES console and enter them into the SES SMTP Username and SES SMTP Password fields.
  4. Click Save Settings.

2. How to Run SMTP Connection Diagnostics

  1. Navigate to Mail Inspector > SMTP Connection Tester in your WordPress sidebar.
  2. Select the Run Diagnostics button.
  3. The scanner will run live diagnostics across the 5 connection phases (DNS, Socket, TLS, EHLO, and Auth).
  4. Review the timings for each step.
  5. In case of failure, scroll down to read the Detailed Debug log containing the raw SMTP dialog to help isolate server issues.

3. How to Send a Diagnostic Test Email

  1. Navigate to Mail Inspector > SMTP Connection Tester in your WordPress sidebar.
  2. Under the Send Test Email section, enter a recipient email address.
  3. Click the Send Test Email button.
  4. If successful, you will receive a responsive, beautifully styled dark-themed HTML diagnostic card containing sending site details, active mailer name, and sending timestamp.
  5. In case of failure, the Failure Reason Analyzer will output the cause and recommended fix directly on the page.

4. How to View, Filter, and Resend Email Logs

  1. Go to Mail Inspector > Email Logs in your WordPress sidebar.
  2. Use the Search bar to search by recipient email, subject line, or body contents.
  3. Use the filter dropdowns to view logs filtered by Status (success / failed) or Mailer (php, smtp, gmail, brevo, ses).
  4. Use the right-aligned Show Per Page dropdown to change pagination limits instantly.
  5. To Inspect an Email: Click Inspect on any log row to open a details modal. This displays the message metadata, source plugins, backtrace file paths, headers, and the email body inside an isolated sandbox iframe.
  6. To Resend/Retry an Email: Click Retry on a log row. The script will resend the email, preserve the HTML/Plain Text headers, and update the status of the log.

5. How to Setup Deliverability Digest Reports

Configure automatic email digests summarizing deliverability metrics:

  1. Go to Mail Inspector > Settings and scroll to the Scheduled Digest Reports card.
  2. Toggle the Enable Scheduled Reports setting.
  3. Select the Report Frequency (Daily, Weekly, or Monthly).
  4. Enter comma-separated email addresses in the Recipient Emails field (leave empty to default to the WordPress administrator email).
  5. Click Save Settings.
  6. Manual Trigger: Click the Send Digest Report Now button to test the report template immediately. You will receive a premium styled deliverability email report detailing your health score, MX/SPF/DKIM/DMARC status, and recent failure logs.

6. How to Monitor WooCommerce Transactional Emails

Ensure WooCommerce core transaction notifications are functioning:

  1. Navigate to Mail Inspector > Health Scanner in your WordPress sidebar.
  2. Scroll to the WooCommerce Email Diagnostics section.
  3. The scanner will list major emails (New Order, Customer Processing Order, Customer Completed Order, and Customer Invoice).
  4. Verify if their active status is marked as Enabled (green badge).
  5. If any email is disabled, click the Settings Shortcut Link next to it to go directly to the WooCommerce email settings page and re-enable it.

🔒 Security & Privacy

  • Data Isolation: All logs and configuration data are stored locally inside your WordPress database. The plugin does not transmit data to external servers.
  • Security Nonces: Every AJAX operation and log download form is secured using WordPress nonces.
  • Direct Access Blocker: Every source file checks defined( 'ABSPATH' ) to block direct script execution attempts.
  • Credentials Encryption: Sensitive credentials (passwords, SMTP credentials) are encrypted using a site-specific secret hash key.