docs

Tempmails Docs

Complete guide to installing, configuring, and extending Tempmails. Learn how to host your own disposable email service directly on WordPress.

v1.0.7Mar 7, 2026WP 6.7+12 min read

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

ComponentRequired Version / Type
WordPress6.0 or higher
PHP7.4+ (8.1+ Recommended)
PHP Extensionsphp-imap, php-curl, php-json
Mail ServerIMAP 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

1

Upload Plugin

Download the .zip and upload it via Plugins › Add New › Upload Plugin.

2

Activate

Click the Activate button to enable core database tables and default options.

3

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".

4

Configure IMAP

Navigate to Tempmails › Settings and enter your mail server credentials.

5

Set Retention Policy

Choose how long emails should be kept (Default is 24 hours) before being automatically purged.

6

Placement

Create a new page and paste the [ tempmails_inbox ] shortcode.

7

Final Testing

Send a test email to [email protected] and verify it appears in the frontend inbox.

IMAP Configuration

SettingExample Value
IMAP Hostmail.yourserver.com
IMAP Port993
EncryptionSSL/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 ]
Self-RefreshesCustom DomainsDark Mode SyncEmail Body Viewer
👁️
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

Extensibility

Tempmails is designed for developers. Use these hooks to integrate with custom CRM or notification systems.

Action Hooks

HOOK NAMEDESCRIPTION
tempmails_after_email_receivedFires immediately after an email is saved to DB.
tempmails_cron_cleanup_startedFires before old emails are purged from the database.

Filter Hooks

HOOK NAMEDESCRIPTION
tempmails_allowed_domainsFilter the list of domains shown in the dropdown.
tempmails_inbox_query_argsModify 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 ONLY

Google Fonts

Used for UI typography. We host fonts locally for GDPR compliance by default.

GDPR COMPLIANT

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, 2026

Security patch for SQL injection vulnerability in search query.

v1.0.0

GenesisDec 1, 2025

Initial public release on WordPress.org repository.

Scroll to Top