• Resolved chrismfz

    (@chrismfz)


    In an environment were mail() is disabled, when there is a change for example and fileguard needs

    to send a notification everything stops working with:

    PHP Fatal error: Uncaught Error: Call to undefined function mail()

    in /plugins/ninjafirewall/lib/fw_fileguard.php:55
    Stack trace: 0 plugins/ninjafirewall/lib/firewall.php(234): fw_fileguard()

    Is there a way to prevent that ? Or use SMTP ?

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author nintechnet

    (@nintechnet)

    Unfortunately, it only uses mail() because File Guard works before WordPress loads.
    Maybe an alternative would be to try to load PHPMailer, which is included in WordPress. I will add that to our suggestions list so that we’ll make some tests.

    Thread Starter chrismfz

    (@chrismfz)

    Hello again!

    Doable to check function_exists ? If not, do something else, write to a .log file, anything, just don’t die, the whole website couldn’t load because of this, and everything in subfolders not related to wordpress too.

    Plugin Author nintechnet

    (@nintechnet)

    We’ll add a function_exists call in the next release, but test it on your server because it may not always work as it depends on how the function was disabled.

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Fatal error when mail is disabled’ is closed to new replies.