SuperNova Mail Manager
Advanced control over WordPress emails — override From, set CC/BCC/Reply-To, configure SMTP, and log every outgoing message.
by Jatin Chavda · github.com/jatinchavda/supernova-mail-manager · website
★ 0stars
0forks
Install
No release zip yet. The repository archive installs, but the folder name will carry the branch suffix and updates will not flow:
wp plugin install https://github.com/jatinchavda/supernova-mail-manager/archive/refs/heads/master.zipSuperNova WP Mail Manager
Requires WordPress: 5.8+
Requires PHP: 7.4+
License: GPL-2.0-or-later
Text Domain: supernova-mail-manager
File Structure
supernova-mail-manager/
├── supernova-mail-manager.php ← Main plugin file (bootstrap + hooks)
├── includes/
│ ├── class-snwpmm-settings.php ← Settings registration, sanitisation, accessor
│ ├── class-snwpmm-mailer.php ← wp_mail / phpmailer_init hooks
│ ├── class-snwpmm-admin.php ← Admin menu, settings page, log page
│ └── class-snwpmm-logger.php ← DB log table + capture hooks
├── languages/ ← .pot / .po / .mo translation files (future)
└── README.md
WordPress Coding Standards Checklist
| Standard | Applied |
|---|---|
Unique prefix snwpmm_ on all functions, classes, constants, options |
✅ |
ABSPATH guard in every file |
✅ |
sanitize_* / esc_* on all inputs and outputs |
✅ |
wp_nonce_field + check_admin_referer on all forms |
✅ |
current_user_can('manage_options') capability check |
✅ |
register_setting with sanitize_callback |
✅ |
wp_safe_redirect + exit after form handling |
✅ |
No direct DB queries without $wpdb + prepared statements |
✅ |
dbDelta for table creation |
✅ |
Internationalisation with __() / esc_html_e() / esc_attr_e() |
✅ |
| Singleton pattern — one instance per class | ✅ |
register_activation_hook / register_deactivation_hook |
✅ |
| PHPDoc blocks on every class, method, and property | ✅ |
admin-post.php endpoint for form actions (not $_SERVER['REQUEST_URI']) |
✅ |
| Password field: only updates when a new value is entered | ✅ |
Security Note — SMTP Password
The SMTP password is stored in wp_options as plain text (encrypted storage is
outside WordPress core). For production use consider one of these approaches:
- Environment variable — define
SNWPMM_SMTP_PASSinwp-config.phpand read it inSNWPMM_Settings::get()before falling back to the DB value. - Secret Manager — retrieve the value from AWS Secrets Manager / GCP Secret Manager at runtime and never persist it.
Planned Future Features
- Email templates — HTML wrapper for all outgoing WordPress emails.
- Per-role CC/BCC — add different CC addresses based on the sending context.
- Conditional routing — use different SMTP profiles for WooCommerce vs. contact-form emails.
- WP-CLI commands —
wp snwpmm log list,wp snwpmm log clear,wp snwpmm test-email. - Log auto-pruning — scheduled event to delete log rows older than N days.
- Import / Export settings — JSON export and import of all options.
- Multisite support — network-level settings with per-site overrides.
- App password support — dedicated UI helpers for Gmail / Outlook OAuth.