Could not instantiate mail function


The alert email notifications are not sent, although the “Test transport” is working. I have also entered the valid email address in Global Settings -> Alerting -> General Alert Settings -> Default contact. The error I got in Overview -> Eventlog:
Could not issue recovery for rule ‘Sensor over limit - Check Device Health Settings’ to transport ‘mail’ Error: Could not instantiate mail function.

The value for “Global Settings -> Alerting -> Email Options -> How to deliver mail” is mail, the same as “Transport type” I tested and is working.

I have also read the existing topics related to similar issues but I didn’t find a fix that could work for me.

Here is the output of ./validate.php:

Component | Version
--------- | -------
LibreNMS  | 1.64.1-18-g7b93b386a
DB Schema | 2020_04_19_010532_eventlog_sensor_reference_cleanup (165)
PHP       | 7.2.31
Python    | 3.8.2
MySQL     | 10.4.12-MariaDB-log
RRDTool   |
SNMP      | NET-SNMP 5.8

[OK]    Composer Version: 1.10.7
[OK]    Dependencies up-to-date.
[OK]    Database connection successful
[OK]    Database schema correct

Switching from mail to SMTP în “Global Settings -> Alerting -> Email Options -> How to deliver mail" makes the email alerts using Alert Transport to work. It is still odd that mail doesn’t work, since the test emails (“Test transport”) made it through.

Also, there is another issue related to the notification emails. Although the “Use HTML emails” option is On, the emails are in plain text.