
Could not instantiate mail function means the mail() call in PHP returned false. WordPress prints the same sentence whether sendmail refused the message, was missing or exited with an error. In our lab a small mu-plugin recovered the exit code on PHP 8.5, and moving to SMTP turned the sentence into the server’s own reason.