Problem
You see the following error:
Could not instantiate mail function
Cause
This error occurs when you have selected PHP Mail as your Mail Provider setting. It indicates that the mail server rejected the system’s attempt to send mail.
The PHP Mail function uses the server’s mail()
function, which is not always reliable. It also doesn’t generate a friendly error.
Solution
Choose another Mail Provider in the Mail tab at Configuration () > System Settings > General Settings. These other methods are also usually more reliable when sending emails.
You could also try the following alternative server-side configuration changes that might resolve PHP mail()
issues:
- Install a local mail server (for example, Postfix).
- Ensure that your
sendmail_path
points at thesendmail
binary (usually/usr/sbin/sendmail
) in yourphp.ini
file.
On Ubuntu or Debian® servers, you may have multiple .ini
files in /etc/php5/mods-available
or other locations.
Last modified: October 29, 2024