Tempmails Docs
Complete guide to installing, configuring, and extending Tempmails. Learn how to host your own disposable email service directly on WordPress.
Overview
No APIs
Runs entirely on your server. No third-party email providers or API keys required for core functionality.
IMAP Inbox
Connect to any standard IMAP server with catch-all support to process thousands of aliases instantly.
MD3 UI
Beautifully crafted Material Design 3 interface for the front-end inbox, fully responsive and customizable.
AJAX Powered
Real-time email fetching and UI updates without page reloads using optimized WordPress AJAX handlers.
Requirements
| Component | Required Version / Type |
|---|---|
| WordPress | 6.0 or higher |
| PHP | 7.4+ (8.1+ Recommended) |
| PHP Extensions | php-imap, php-curl, php-json |
| Mail Server | IMAP Support with Catch-all enabled |
Warning
The php-imap extension is mandatory. Many shared hosting providers disable this by default. Please verify its availability via phpinfo() before proceeding.
Installation Steps
Upload Plugin
Download the .zip and upload it via Plugins › Add New › Upload Plugin.
Activate
Click the Activate button to enable core database tables and default options.
Create Catch-all Email
In your hosting panel (cPanel/Plesk), create a main email account and set it as the "Default Address" or "Catch-all".
Configure IMAP
Navigate to Tempmails › Settings and enter your mail server credentials.
Set Retention Policy
Choose how long emails should be kept (Default is 24 hours) before being automatically purged.
Placement
Create a new page and paste the [ tempmails_inbox ] shortcode.
Final Testing
Send a test email to [email protected] and verify it appears in the frontend inbox.
IMAP Configuration
| Setting | Example Value |
|---|---|
| IMAP Host | mail.yourserver.com |
| IMAP Port | 993 |
| Encryption | SSL/TLS |
| Username | [email protected] |
| Password | •••••••• |
Example cPanel Filter for Catch-all Routing:
# Forward all unknown emails to our plugin inbox if $header_to: does not match "[email protected]" then unseen deliver "[email protected]" endif
Shortcode Reference
Main Application Hook
[ tempmails_inbox ]Live Preview
Render an interactive list of received emails with read/unread status indicators.
Alias Generator
One-click random alias generation with clipboard copy functionality.
Attachments
Securely download attachments directly from the web interface.
Clean Body
Automatic HTML sanitization and iframe isolation for safe viewing.
Developer Hooks
Tempmails is designed for developers. Use these hooks to integrate with custom CRM or notification systems.
Action Hooks
| HOOK NAME | DESCRIPTION |
|---|---|
| tempmails_after_email_received | Fires immediately after an email is saved to DB. |
| tempmails_cron_cleanup_started | Fires before old emails are purged from the database. |
Filter Hooks
| HOOK NAME | DESCRIPTION |
|---|---|
| tempmails_allowed_domains | Filter the list of domains shown in the dropdown. |
| tempmails_inbox_query_args | Modify the WP_Query args for fetching emails. |
Code Snippet: Custom Action
// Example: Log incoming emails to a custom log file
add_action( 'tempmails_after_email_received', function( $email_id, $data ) {
$log_msg = sprintf( "New email to %s from %s", $data['to'], $data['from'] );
error_log( $log_msg );
}, 10, 2 );External Services
GitHub Feed
Fetches the latest security patches and announcements from our main repository.
OPT-IN ONLYGoogle Fonts
Used for UI typography. We host fonts locally for GDPR compliance by default.
Changelog
v1.0.7
LATESTMarch 7, 2026- Fixed IMAP connection timeout on some LiteSpeed servers.
- Added support for Dark Mode detection in system settings.
- Updated JetBrains Mono font files to latest version.
v1.0.4
Jan 12, 2026Security patch for SQL injection vulnerability in search query.
v1.0.0
GenesisDec 1, 2025Initial public release on WordPress.org repository.