A desktop application for logging and viewing emails sent from WordPress Studio local sites. Built with Electron and React.
- Features
- Screenshots
- Prerequisites
- Development Setup
- Building Executables
- Usage
- How It Works
- Technical Stack
- License
- WordPress Studio Integration
- Automatic detection of WordPress Studio installations
- Validates wp-content/database/.ht.sqlite presence
- Recent directories support for quick access
- Email Logging
- Automatically installs mu-plugin to capture all wp_mail() calls
- Logs emails to JSON files in wp-content/uploads/wp-mail-logs/
- Real-time monitoring for new emails
- Email Viewing
- List all logged emails with sender, recipient, subject, and timestamp
- View full email details including headers and attachments
- Support for both HTML and plain text email messages
- Delete individual emails or clear all emails
- Clean, modern UI with real-time updates
- Cross-platform support (macOS, Windows, Linux)
(Screenshots will be added after the app is tested)
- Node.js 18.x or higher
- npm 9.x or higher
- A WordPress Studio installation for testing (GitHub)
- Clone the repository:
git clone https://github.com/jonathanbossenger/wp-mail.git
cd wp-mail- Install dependencies:
npm install- Start the development server:
npm run devThis will:
- Generate application icons
- Start webpack in watch mode for the renderer process
- Launch Electron in development mode
- Enable hot reloading for React components
The project uses Electron Forge for building platform-specific executables.
npm run makeThis will create executables in the out/make directory for:
- macOS (.dmg)
- Windows (.exe)
- Linux (.deb, .rpm)
For macOS:
npm run make -- --platform=darwinFor Windows:
npm run make -- --platform=win32For Linux:
npm run make -- --platform=linux- Launch the application
- Select your WordPress Studio site directory
- The app will automatically:
- Validate the WordPress Studio installation
- Install a mu-plugin to log emails
- Start monitoring for new emails
- Send test emails from your WordPress site (e.g., password reset, user registration)
- View logged emails in the app:
- Click on an email to view full details
- Delete individual emails with the trash icon
- Clear all emails with the "Clear All" button
- When switching sites or closing the app, the mu-plugin remains installed for future use
The app installs a mu-plugin (wp-mail-logger.php) in your WordPress Studio site's wp-content/mu-plugins/ directory. This plugin:
- Hooks into WordPress's
wp_mailaction - Captures all email data (to, from, subject, message, headers, attachments)
- Saves each email as a JSON file in
wp-content/uploads/wp-mail-logs/ - Adds security protection with .htaccess
The app uses file system watching (chokidar) to:
- Monitor the wp-mail-logs directory for changes
- Automatically update the UI when new emails are logged
- Provide real-time feedback without requiring manual refresh
Each email is stored as a separate JSON file with:
- Unique ID
- Timestamp (both human-readable and unix timestamp)
- Sender and recipient information
- Subject and message body
- Headers and attachment information
- Electron - Desktop application framework
- React - UI framework
- Tailwind CSS - Styling and responsive design
- Chokidar - File system monitoring
- Heroicons - Icon library
- Sharp & PNG2Icons - Icon generation
npm start- Start the applicationnpm run dev- Start the application in development modenpm run build- Build the renderer processnpm run package- Package the application without creating installersnpm run make- Create platform-specific distributablesnpm run generate-icons- Generate application icons from SVG
GPL-2.0-or-later