Title: Fatal Error
Last modified: June 30, 2026

---

# Fatal Error

 *  Resolved [gleenk](https://wordpress.org/support/users/gleenk/)
 * (@gleenk)
 * [5 days ago](https://wordpress.org/support/topic/fatal-error-4989/)
 * Hi,
 * I’m reporting a fatal error that occurs with **Post SMTP 3.9.5** on **WordPress
   7**.
 * The issue happens when the **error log option is enabled** in the plugin settings.
   
   If I keep the error logging option active and try to send a test email, WordPress
   returns a fatal error.
 * The relevant part of the error log is:
 *     ```wp-block-code
       [30-Jun-2026 13:24:40 UTC] PHP Fatal error: Uncaught Error: Call to undefined function error_log() in /wp-content/plugins/post-smtp/Postman/PostmanLogger.php:59
       Stack trace:
       #0 /wp-content/plugins/post-smtp/Postman/PostmanLogger.php(43): PostmanLogger->printLog('Exception code=...', 40000, 'ERROR')
       #1 /wp-content/plugins/post-smtp/Postman/PostmanWpMail.php(359): PostmanLogger->error('Exception code=...')
       #2 /wp-content/plugins/post-smtp/Postman/PostmanWpMail.php(67): PostmanWpMail->sendMessage(Object(PostmanMessage), Object(PostmanEmailLog))
       #3 /wp-content/plugins/post-smtp/Postman/Phpmailer/PostsmtpMailer.php(145): PostmanWpMail->send(...)
       #4 /wp-includes/pluggable.php(628): PostsmtpMailer->send()
       #5 /wp-content/plugins/post-smtp/Postman/Postman-Send-Test-Email/PostmanSendTestEmailController.php(357): wp_mail(...)
       #6 /wp-includes/class-wp-hook.php(341): PostmanSendTestEmailAjaxController->sendTestEmailViaAjax('')
       #7 /wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters('', Array)
       #8 /wp-includes/plugin.php(522): WP_Hook->do_action(Array)
       #9 /wp-admin/admin-ajax.php(192): do_action('wp_ajax_postman...')
       #10 {main}
         thrown in /wp-content/plugins/post-smtp/Postman/PostmanLogger.php on line 59
       ```
   
 * It looks like the plugin calls the PHP `error_log()` function directly inside:
 *     ```wp-block-code
       /wp-content/plugins/post-smtp/Postman/PostmanLogger.php:59
       ```
   
 * However, on this hosting environment the `error_log()` function appears to be
   unavailable or disabled, so the plugin triggers a fatal error instead of handling
   the missing function gracefully.
 * Could you please check whether the logger can verify that `error_log()` exists
   before calling it?
 * For example, something like:
 *     ```wp-block-code
       if (function_exists('error_log')) {
           error_log($message);
       }
       ```
   
 * Or alternatively fall back to another logging method when the function is unavailable.
 * At the moment, the workaround is to disable the plugin error log option, but 
   it would be useful if the plugin could avoid a fatal error in this case.
 * Thank you.

Viewing 3 replies - 1 through 3 (of 3 total)

 *  Plugin Support [M Aqib Khan](https://wordpress.org/support/users/aqibkhan9/)
 * (@aqibkhan9)
 * [4 days, 5 hours ago](https://wordpress.org/support/topic/fatal-error-4989/#post-18952898)
 * Hi [@gleenk](https://wordpress.org/support/users/gleenk/),
 * Thank you for reporting this in detail.
 * I’ve forwarded this to our development team for further assessment. They’ll review
   the `PostmanLogger.php` file and look into adding a `function_exists('error_log')`
   check (or a graceful fallback) before the function is called.
 * I’ll update you here once I hear back from them.
 * In the meantime, disabling the error log option in the plugin settings is the
   recommended workaround to avoid the fatal error.
 * Thanks for your patience!
 *  Plugin Support [M Aqib Khan](https://wordpress.org/support/users/aqibkhan9/)
 * (@aqibkhan9)
 * [3 days, 9 hours ago](https://wordpress.org/support/topic/fatal-error-4989/#post-18953811)
 * Hi [@gleenk](https://wordpress.org/support/users/gleenk/),
 * Our development team has fixed this issue. The root cause was exactly what you
   identified: error_log() was being called without checking if the function exists
   first.
 * We’ve added a function_exists(‘error_log’) check in PostmanLogger.php and a graceful
   fallback when the function is unavailable.
 * Could you please download the beta version and test it on your setup?
 * [Download the beta](https://drive.google.com/file/d/1U167w7dqta_XwPZ6f9EqiR4sVx8Q9PSV/view?usp=sharing)
 * Once you’ve had a chance to test, please let us know how it goes. If everything
   looks good, we’ll roll this fix into the next stable release.
 *  Thread Starter [gleenk](https://wordpress.org/support/users/gleenk/)
 * (@gleenk)
 * [19 hours, 31 minutes ago](https://wordpress.org/support/topic/fatal-error-4989/#post-18956005)
 * It works!

Viewing 3 replies - 1 through 3 (of 3 total)

You must be [logged in](https://login.wordpress.org/?redirect_to=https%3A%2F%2Fwordpress.org%2Fsupport%2Ftopic%2Ffatal-error-4989%2F%3Foutput_format%3Dmd&locale=en_US)
to reply to this topic.

 * ![](https://ps.w.org/post-smtp/assets/icon-128x128.gif?rev=3209655)
 * [Post SMTP – Complete Email Deliverability and SMTP Solution with Email Logs, Alerts, Backup SMTP & Mobile App](https://wordpress.org/plugins/post-smtp/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/post-smtp/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/post-smtp/)
 * [Active Topics](https://wordpress.org/support/plugin/post-smtp/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/post-smtp/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/post-smtp/reviews/)

 * 3 replies
 * 2 participants
 * Last reply from: [gleenk](https://wordpress.org/support/users/gleenk/)
 * Last activity: [19 hours, 31 minutes ago](https://wordpress.org/support/topic/fatal-error-4989/#post-18956005)
 * Status: resolved