Your forum’s
email, rebuilt.
VaultMail replaces MyBB’s scattered, hardcoded email infrastructure with a fully managed, ACP-driven system — per-type templates, multi-backend sending, multilingual variants, and a metadata audit log.
20 email types · 3 sending backends · HTML templates · Developer API
How VaultMail intercepts
your forum’s mail
MyBB calls my_mail()
Any outgoing email — registration, PM, report, ban — flows through MyBB’s central mail function.
VaultMail injects Handler
Via the my_mailhandler_init hook, VaultMail’s Handler class is injected as the active mail handler.
Type is resolved
The Resolver identifies which of the 20 email types this is — by subject pattern, language strings, or ContextStore context.
Template is rendered
Your custom HTML template is fetched, variables are injected (two-layer extraction), and the language variant is selected.
Dispatched & logged
Email is sent via your chosen backend (PHP mail / SMTP / API). Metadata is written to the audit log — body never stored.
Everything you’d expect.
And what you didn’t know you needed.
Per-Type Template Control
Each of MyBB’s 20 email types gets its own HTML template. Enable or disable VaultMail per type — types you leave off fall back to MyBB’s native mailer seamlessly.
Multilingual Variants
Create language-specific template variants per email type. VaultMail auto-selects the right variant based on the recipient’s board language — with a configurable fallback.
Multi-Backend Sending
Switch between PHP mail, direct SMTP (with TLS and auth), or a JSON API backend (Mailgun, SendGrid, Postmark, or fully custom) — from the ACP, no code changes.
Sandbox / Test Mode
Enable test mode and set a catch address. Every outgoing email is silently redirected there — with a “test” status in the log. No real users get flooded during setup.
Metadata Audit Log
Every send is logged: recipient, template key, language, backend used, status, and error if any. Email body is never stored. Full ACP search and filtering interface.
Developer API
Send any VaultMail template programmatically from your own plugin. Pass a template key, recipient, and variable overrides — VaultMail handles rendering and dispatching.
New Email Types
VaultMail adds email types MyBB never had: ban notifications, unban notifications, moderation queue alerts — complete with context capture and full template support.
HTML Shell Templates
Wrap all your emails in a branded shell. The default shell is a clean, professional HTML layout — fully editable from the ACP template editor.
Two-Layer Variable Extraction
Variables are resolved from both pre-send context hooks (timing-independent) and runtime VarExtractor analysis — ensuring rich, accurate variable injection for every email type.
Every email type,
under your control.
20 email types across registration, account management, moderation, subscriptions, and messaging. Some types were never sent by MyBB at all — VaultMail adds them.
| Template Key | Description | Category | Origin |
|---|---|---|---|
| registration_welcome | Registration — Welcome Email | Registration | MyBB |
| registration_activation | Registration — Email Activation | Registration | MyBB |
| registration_admin_approve | Registration — Admin Approval Notification | Registration | MyBB |
| password_reset | Account — Password Reset Request | Account | MyBB |
| password_reset_complete | Account — New Password After Reset | Account | MyBB |
| email_change_verify | Account — Email Address Change Verification | Account | MyBB |
| private_message_notify | Private Messages — New PM Notification | Messaging | MyBB |
| thread_subscription | Subscriptions — New Thread Reply | Subscriptions | MyBB |
| forum_subscription | Subscriptions — New Thread in Forum | Subscriptions | MyBB |
| contact_us_admin | Contact — Contact Form Alert to Admin | Contact | MyBB |
| mass_mail | Mass Mail — ACP Bulk Send | Admin | MyBB |
| report_notification | Moderation — Report Notification | Moderation | MyBB |
| ban_notification | Moderation — User Banned Notification | Moderation | VaultMail ✦ |
| unban_notification | Moderation — User Unbanned Notification | Moderation | VaultMail ✦ |
| moderation_queue_alert | Moderation — Post Queue Alert to Moderators | Moderation | VaultMail ✦ |
✦ These email types did not exist in MyBB. VaultMail introduces them. Showing 15 of 20 types.
One plugin.
Three ways to deliver.
Switch backends from the ACP — no code changes, no reinstall. Each backend supports live connection testing before you go live.
Delegates to MyBB’s built-in PhpMail handler. Zero configuration required — ideal for shared hosting where you don’t control the mail server.
- Zero configuration
- Shared hosting compatible
- Instant setup
Connect directly to your SMTP server with full authentication and TLS support. Works with Gmail, Outlook, Mailjet, and any standard SMTP provider.
- TLS / STARTTLS encryption
- Full SMTP authentication
- Custom host + port
- Live connection test
Send via a JSON API endpoint. Pre-built support for Mailgun, SendGrid, and Postmark. Or supply your own endpoint for complete flexibility.
- Mailgun · SendGrid · Postmark
- Custom endpoint support
- Bearer or key auth
- Live connection test
Send any template
from your own plugin.
VaultMail exposes a clean, hookless API for other plugins. Pass a template key, recipient email, and optional variable overrides — rendering, language selection, and dispatch are handled automatically.
use VaultBB\VaultMail\API;
$result = API::send( ‘registration_welcome’, ‘[email protected]‘, [ ‘username’ => ‘Elara’, ‘board_name’ => ‘MyBoard’, ‘activation_url’ => $url, ] );
if ($result[‘success’]) { // Logged, templated, dispatched. }
triggered_by: api — traceable and auditable alongside native sends.Know exactly what
was sent — and when.
VaultMail logs every outgoing email’s metadata: recipient, template type, language, backend, status, and triggered-by source. Email body is never stored — privacy by design.
| Time | Recipient | Template | Lang | Backend | Status | Source |
|---|---|---|---|---|---|---|
| 14:32:01 | [email protected] | registration_welcome | english | smtp | ● sent | mybb_core |
| 14:28:45 | [email protected] | private_message_notify | english | smtp | ● sent | mybb_core |
| 14:21:14 | [email protected] | password_reset | english | smtp | ● test | mybb_core |
| 14:15:02 | [email protected] | ban_notification | english | api | ● sent | vaultmail_hook |
| 13:59:38 | [email protected] | moderation_queue_alert | english | api | ● failed | vaultmail_hook |
| 13:44:17 | [email protected] | thread_subscription | french | smtp | ● sent | mybb_core |
What’s changed.
- Improved SMTP & API backends are fully implemented.
- Added Template engine is done. Language resolution works down the chain (recipient lang → board default → __default__), variables are substituted via {placeholders} sourced from MyBB globals and recipient data, and the shell wrapping is in place. The supporting pieces — under-the-hood private mechanisms — are all there. The ACP editor has live AJAX preview and a test send button that fires a real email to the logged-in admin.
- Fixed Developer API is complete, including the ACP reference page. API::send() and friends are safe to call even when VaultMail is disabled — they just return false cleanly, no exceptions thrown.
- Improved Settings UI is in. All the config groups are there — backend selection, SMTP credentials, API provider details, From address, test mode with a catch address, queue and rate limiting. One thing worth mentioning: the test connection button works against whatever is currently typed in the form, no save required first.
- Improved Overall Enhancement
- Improved SMTP Handling
- Added Plugin files — dev started
Your forum deserves
better email.
One purchase. Every feature. The email system MyBB should have shipped with.