SMTP Mail Control for MailPoet

DescripciĂłn

By default, MailPoet sends emails via PHP Mail, its premium MailPoet Sending Service, or services like Amazon SES or SendGrid. But there’s a catch: Some SMTP providers (like Gmail) aren’t supported, and email logging isn’t possible.

➡ This plugin fixes that. It ensures all MailPoet newsletters are sent via your chosen SMTP plugin, so your WordPress email settings apply to newsletters, too – without extra setup or extra costs.

🛠 Works with popular SMTP plugins like:

✅ WP Mail SMTP (by WPForms – the most widely used SMTP plugin)
✅ FluentSMTP (lightweight, free, GDPR-friendly)
✅ Post SMTP (supports OAuth for Gmail, Outlook, etc.)
✅ Easy WP SMTP (simple & reliable)
✅ MailerSend, Brevo (formerly Sendinblue), and more

🎯 Why use this plugin?

✔ Ensures MailPoet emails follow your SMTP settings
✔ Works with Gmail & other SMTP providers MailPoet doesn’t support
✔ Enables email logging via your SMTP plugin

⚠ Important notes:

  • Major MailPoet updates may require adjustments.
  • Some advanced MailPoet features (like bounce handling) may behave differently.

✅ Test your setup with MailPoet test emails and real newsletters to ensure everything runs smoothly!

InstalaciĂłn

  1. Download or clone this plugin into your /wp-content/plugins/ directory.
  2. Make sure the folder is named something like omppm-override-phpmail-mailpoet.
  3. Go to Plugins in your WordPress admin area and activate Override PHP Mail for Mailpoet (via wp_mail).
  4. In MailPoet > Settings, choose «Server (Standard)» or «PHP mail» as your sending method (so it normally uses PHPMail).
  5. Configure your SMTP method in WP Mail SMTP (or your preferred SMTP plugin).
    • If you’re using Gmail API or another specialized flow, ensure it’s properly set up in WP Mail SMTP.
  6. Send a test newsletter (or use the MailPoet test mail) and verify via WP Mail SMTP logs or email headers that the mail goes through your desired SMTP provider.

Preguntas frecuentes

Does this plugin replace MailPoet’s default sending method completely?

Yes. For all newsletters and test emails that would normally use «PHPMail,» it redirects to wp_mail(). However, if you are using MailPoet’s own «MailPoet Sending Service» or «SendGrid,» those remain unaffected.

Will this plugin work with MailPoet 4, 5, or future versions?

It has been tested with MailPoet 5.x. MailPoet may change internal classes or architecture in future updates, which could break this override approach. We recommend testing on a staging site whenever you update MailPoet.

What if my emails still seem to go out via `mail()`?

  • Double-check that you have the correct sending method set in MailPoet («Server» / «PHP mail»), not an external SMTP inside MailPoet’s own configuration.
  • Verify that WP Mail SMTP (or any other SMTP plugin) is active and configured.
  • Check if the MailPoet test emails differ from real newsletter sends. Sometimes the test mail can take a different route.

Does this plugin require code changes in MailPoet?

No. But internally, it uses a «class alias» hack to replace MailPoet’s PHPMail class on the fly, which can be update-sensitive. If you see errors or your newsletter fails after a MailPoet update, deactivate and re-check plugin compatibility.

Reseñas

14 de octubre de 2025
SMTP Mail Control for MailPoet is a fantastic plugin! It’s easy to set up (no configuration necessary) and works flawlessly. The integration with MailPoet is seamless. It’s highly recommended for anyone who wants to use MailPoet with an existing self-selected SMTP plugin (in my case WP Mail SMTP with Google Workspace OAuth). Keep up the great work! 👍 Vielen Dank, Saskia. 🙏
8 de octubre de 2025
I like MailPoet but I really wanted to use FluentSMTP as it comes with mail logging and push notifications through Telegram in case mails can’t be send which is great. And it comes with a fallback connection. Surprisingly, MailPoet didn’t support most of that stuff and therefore I’m really happy and grateful to have found this plugin. Sometimes things get logged twice in FluentSMTP but that’s no problem. Big thanks to the developer and please keep up your great work.
8 de febrero de 2025 1 respuesta
I must admit, I was surprised to learn that I wasn’t able to log my SMTP traffic using vanilla Mailpoet out of the box. I’ve been using several SMTP plugins over the years, and they are in reality mandatory if you want to ensure predictable delivery of emails sent from the web server, including SSL encryption and authentication. Not to forget logging, which is crucial to debug any delivery issues. I’ve tested Override PHP Mail for Mailpoet with FluentSMTP and so far it works perfectly. All outgoing mail is now being logged and can be monitored within the dashboard. To make sure I have a fallback available, I did the following: first I set up the standard Mailpoet SMTP sending method, including its settings for SMTP host name, port, username, password and SSL, and made sure that worked. then I configured FluentSMTP with the same SMTP settings, and made sure that worked too. finally, I switched Mailpoet send with from SMTP to Your web host / web server (php), and performed a final test, including checking the newsletter was logged in FluentSMTP. It was. That way, should the override fail, I should be able to disable the plugin and toggle Mailpoet back to SMTP and carry on as usual, albeit without the logging. Nice work, and thank you so much for sharing ⭐⭐⭐⭐⭐
Leer todas las 3 reseñas

Colaboradores y desarrolladores

«SMTP Mail Control for MailPoet» es un software de código abierto. Las siguientes personas han colaborado con este plugin.

Colaboradores

«SMTP Mail Control for MailPoet» ha sido traducido a 5 idiomas locales. Gracias a los traductores por sus contribuciones.

Traduce «SMTP Mail Control for MailPoet» a tu idioma.

ÂżInteresado en el desarrollo?

Revisa el cĂłdigo , echa un vistazo al repositorio SVN o suscrĂ­bete al registro de desarrollo por RSS.

Registro de cambios

1.2.4

Release date: January 21st 2026

  • Tested up to WP 6.9

1.2.3

Release date: January 21st 2026

  • BUGFIX: Kritischer Fix fĂŒr Endlosschleifen beim E-Mail-Versand
  • BUGFIX: Rekursionsschutz verhindert Timeout-Fehler bei WordPress-System-E-Mails
  • Problem behoben: Passwort-ZurĂŒcksetzen und andere WordPress-E-Mails fĂŒhrten zu «Maximum execution time exceeded»-Fehler
  • Neues Sicherheitsfeature: Automatische Erkennung und Verhinderung von rekursiven wp_mail()-Aufrufen
  • Verbesserte StabilitĂ€t bei Verwendung mit WP Mail SMTP und anderen SMTP-Plugins
  • Verhindert Konflikte wenn MailPoet versucht, WordPress-System-E-Mails zu verarbeiten

1.2.2

Release date: August 21st 2025

  • NEU: Dynamische MailPoet E-Mail-Typ-Erkennung mit Reflection
  • NEU: Automatische UnterstĂŒtzung fĂŒr alle offiziellen MailPoet E-Mail-Typen
  • NEU: Zukunftssichere E-Mail-Typ-Validierung
  • NEU: Reflection-basierte E-Mail-Typ-Entdeckung
  • NEU: Gecachte E-Mail-Typ-Erkennung fĂŒr Performance
  • NEU: Erweitertes Admin-Interface mit dynamischer E-Mail-Typ-Anzahl
  • NEU: Automatische Updates wenn MailPoet neue E-Mail-Typen hinzufĂŒgt
  • NEU: UnterstĂŒtzung fĂŒr alle MailPoet E-Mail-Typen:
    • automation, automation_notification, automation_transactional
    • standard, notification, notification_history
    • re_engagement, wc_transactional, confirmation_email
    • automatic, welcome (Legacy-Support)
  • NEU: Intelligentes Fallback-System fĂŒr E-Mail-Typ-Erkennung
  • NEU: Verbessertes Debugging fĂŒr E-Mail-Typ-Matching
  • NEU: Performance-optimierte Reflection mit Caching
  • Verbesserte KompatibilitĂ€t mit MailPoets neuestem E-Mail-Typ-System
  • Erweiterte UnterstĂŒtzung fĂŒr WooCommerce transaktionale E-Mails
  • Bessere Fehlerbehandlung und Logging fĂŒr E-Mail-Typ-Erkennung
  • Zukunftssichere Architektur die sich automatisch an MailPoet-Updates anpasst

1.2.1

Release date: August 20th 2025

  • NEU: Erweiterte E-Mail-Typ-UnterstĂŒtzung mit Pattern-Matching
  • NEU: UnterstĂŒtzung fĂŒr Preview-E-Mails
  • NEU: UnterstĂŒtzung fĂŒr E-Mail-Statistik-Benachrichtigungen
  • NEU: UnterstĂŒtzung fĂŒr neue Abonnenten-Benachrichtigungen
  • NEU: Intelligentes Pattern-Matching fĂŒr automatische E-Mails
  • NEU: WooCommerce automatische E-Mail-UnterstĂŒtzung (automatic_woocommerce_*)
  • NEU: Generische automatische E-Mail-Pattern-UnterstĂŒtzung (automatic__)
  • NEU: Erweiterte E-Mail-Typ-Validierung mit Regex-Patterns
  • NEU: Verbessertes Debugging fĂŒr E-Mail-Typ-Matching
  • NEU: Admin-Interface zeigt Anzahl unterstĂŒtzter E-Mail-Typen
  • NEU: Zukunftssichere E-Mail-Typ-Erkennung
  • Verbesserte KompatibilitĂ€t mit MailPoets neuestem automatischen E-Mail-System
  • Erweiterte UnterstĂŒtzung fĂŒr komplexe E-Mail-Typ-Patterns
  • Bessere Fehlerbehandlung und Logging fĂŒr E-Mail-Typ-Erkennung

1.2.0

Release date: August 19th 2025

  • NEU: VollstĂ€ndige PHP 8.3 KompatibilitĂ€t mit intelligenten Fallbacks
  • NEU: Zukunftssichere Architektur fĂŒr kommende PHP-Versionen
  • Verbesserte StabilitĂ€t und Performance ĂŒber alle PHP 8.x Versionen
  • Optimierte Code-Struktur mit modernen PHP-Best-Practices
  • Erweiterte KompatibilitĂ€t mit WordPress 6.5+ und MailPoet 5.x

1.1.0

Release date: August 11th 2025

  • Normalization of translations: en_US is now default locale as per WordPress Codex

1.0.15

Release date: August 8th 2025

  • NEU: VollstĂ€ndig ĂŒberarbeitetes Admin-Dashboard mit moderner BenutzeroberflĂ€che
  • NEU: Interaktive Debug-Funktionen mit Echtzeit-Log-Anzeige
  • NEU: Erweiterte Test-E-Mail-FunktionalitĂ€t fĂŒr MailPoet und Standard-SMTP
  • NEU: Professionelle BenutzeroberflĂ€che mit modernem Design und verbesserter UX
  • NEU: Umfassende Debugging-Tools fĂŒr Entwickler und Administratoren
  • NEU: Verbesserte Fehlerbehandlung und Benutzer-Feedback-System
  • NEU: Responsive Design fĂŒr alle GerĂ€te und BildschirmgrĂ¶ĂŸen
  • NEU: Erweiterte JavaScript-FunktionalitĂ€t mit AJAX-Integration
  • NEU: CSS-Styling mit modernen UI-Komponenten und Animationen
  • NEU: Umfassende Admin-Klasse mit professioneller Codestruktur
  • Verbesserte StabilitĂ€t und Performance
  • Optimierte Code-Struktur und Wartbarkeit

1.0.14

Release date: August 8th 2025

  • Fixed «Test-Email senden» button functionality
  • Added AJAX handler for test email sending
  • Improved error handling and user feedback
  • Added detailed test email with plugin information
  • Enhanced JavaScript error reporting for debugging

1.0.13

Release date: August 8th 2025

  • Added developer information card with professional presentation
  • Added direct links to GitHub repository for issues and contributions
  • Added contact information and company details
  • Enhanced admin interface with developer branding
  • Prepared for GitHub repository integration
  • Added comprehensive GitHub setup documentation

1.0.12

Release date: August 8th 2025

  • Added comprehensive setup instructions with step-by-step guidance
  • Added visual «How It Works» explanation with animated cards
  • Added troubleshooting section with common issues and solutions
  • Added interactive MailPoet test email button
  • Enhanced admin interface with modern, visually appealing design
  • Added SMTP configuration examples for popular providers
  • Improved user experience with clear setup workflow
  • Added visual indicators and badges for better guidance

1.0.11

Release date: August 8th 2025

  • Added modern, extensible admin interface under Tools > OMPPM Tools
  • Individualized debug constant (OMPPM_DEBUG) independent of WP_DEBUG
  • Interactive debug toggle with real-time status updates
  • Log management with clear and refresh functionality
  • Plugin status monitoring (MailPoet active, Class Alias status)
  • Quick action buttons for MailPoet and SMTP settings
  • Modern, responsive design with card-based layout
  • AJAX-powered interface with notifications
  • Object-oriented architecture for easy future expansion

1.0.10

Release date: August 8th 2025

  • Fixed fatal error: MailerMethod is an interface, not a class
  • Corrected base class to PHPMailerMethod (the actual class, not interface)
  • Restored compatibility with MailPoet 5.12.13 class hierarchy
  • Fixed inheritance issue that was preventing plugin from loading

1.0.9

Release date: August 8th 2025

  • Reverted to simple, working approach from version 1.0.4
  • Removed complex dynamic class detection and eval() usage
  • Restored direct class_alias() functionality that worked perfectly
  • Fixed compatibility with MailPoet 5.12.13 using correct class names
  • Simplified plugin architecture for better reliability
  • Removed unnecessary AJAX context checks and multiple hooks

1.0.8

Release date: August 8th 2025

  • Fixed AJAX context detection that was preventing plugin from loading in normal WordPress context
  • Removed overly restrictive AJAX checks that blocked plugin initialization
  • Added more WordPress hooks (muplugins_loaded, after_setup_theme) to catch MailPoet loading earlier
  • Improved class availability checking to work in all contexts
  • Enhanced compatibility with different WordPress loading scenarios

1.0.7

Release date: August 8th 2025

  • Added comprehensive debugging support for troubleshooting email delivery issues
  • Enhanced logging to help identify if emails are being processed via wp_mail() or original MailPoet methods
  • Improved compatibility with WP Mail Logging plugins
  • Added debug messages for better tracking of email processing flow
  • Reverted to working class_alias approach from version 1.0.4
  • Enhanced plugin initialization with plugins_loaded priority 1
  • Added detailed MailPoet class availability checking
  • Improved hook timing to ensure plugin activation
  • Fixed iframe/AJAX compatibility issues with dynamic class definition
  • Added AJAX context detection to prevent fatal errors
  • Fixed class alias creation to only occur when class is properly defined
  • Enhanced class availability checking for all required MailPoet dependencies
  • Added multiple hook attempts to catch MailPoet initialization at different points
  • Added MailPoet version detection for better debugging
  • Enhanced alias detection to prevent duplicate setup attempts
  • Added comprehensive MailPoet class availability checking
  • Enhanced debugging to show all available MailPoet classes
  • Added support for different MailPoet versions with dynamic class detection
  • Fixed compatibility with newer MailPoet class structures
  • Fixed compatibility with MailPoet 5.12.13 using correct class names
  • Analyzed actual MailPoet code to use proper class hierarchy

1.0.7-beta

Release date: August 8th 2025

  • Improved compatibility with WPO365 | Microsoft 365 Graph Mailer and other SMTP plugins
  • Made email type validation more permissive for better backward compatibility
  • Fixed issues where some MailPoet emails were not being processed correctly
  • Enhanced support for emails without specific email_type metadata

1.0.6

Release date: August 6th 2025

  • Fixed memory exhaustion issue during class setup
  • Improved compatibility with AJAX and iframe contexts
  • Added checks for MailPoet class existence to prevent fatal errors
  • Improved loading priority to ensure compatibility with AJAX requests

1.0.6-beta2

Release date: August 1st 2025

  • Memory exhaustion fix: endless loop during class setup fixed

1.0.6-beta

Release date: July 31st 2025

  • Refactured code to improve compatibility with AJAX and iframe contexts
  • Added checks for MailPoet class existence to prevent fatal errors
  • Improved loading priority to ensure compatibility with AJAX requests

1.0.5

Release date: July 31st 2025

  • Fixed AJAX/iframe compatibility issues by adding proper class existence checks
  • Improved loading priority to prevent fatal errors in iframe contexts
  • Added AJAX context detection to handle MailPoet class availability
  • Extended supported email types

1.0.4

Release date: April 3rd 2025

  • Added support for additional MailPoet email types (post notifications, welcome emails, automatic emails)
  • Improved email type detection for better compatibility

1.0.3

Release date: February 19th 2025

  • Readme.txt updated.

= 1.0.1

Release date: January 23rd 2025

  • Polished readme.txt and main plguin file headers.

= 1.0.0

Release date: January 15th 2025

  • Erstveröffentlichung