Error occurred while sending lockout notification email

Thanks to WP Cerber, a DDOS attack on my website was repelled. This is great.

The only small problem is that the notification email to be sent to me was not sent. Instead I got the following message in the admin panel :
An error occurred while sending email. Could not instantiate mail function. Error #2. Recipient(s): xxxxxxxxxxx@gmail.com. Subject: “[yyyyyyyyyyyyyy] WP Cerber: Number of lockouts is increasing (6)”. Date: 26/02/2025, 15:16.

It is not clear why the email was not sent. Generally, sending emails from my website is working. Also, in the WP Cerber notification settings, if I click on “Click to send test”, I get the expected test notification email. And I also get the WP Cerber emails when new versions of plugins are available.

Not sure if this is a bug. Any help ?

Hi!

Is there an email-related plugin active on your site, such as one for sending emails via SMTP? Have you ever received an email with a subject like Number of lockouts is increasing?

Hello nick,
I have no email WordPress plugin installed. My hosting email service is working very well. And I never got an email with subject Number of lockouts is increasing, although I sometimes see in the WP Cerber dashboard that lockouts are exceeding the threshold.

In your case, the best way to pinpoint the cause of the issue is to check the server error log for any entries related to the mail() function around the date shown in the error message. Consider using SMTP, as it can significantly improve the reliability of WP Cerber notifications.

Just so you know, the mail() function, which WordPress and WP Cerber use to send email notifications, isn’t part of WP Cerber. It’s a server-level function, so we can’t say for sure why the email wasn’t sent. The issue likely comes from your hosting setup. The error message you’ve shared is the only info WP Cerber can get from the web server.