Manage cookies that are used for advertising, such as ad personalization, remarketing, and ad effectiveness analysis.
4.8.6. Error calling PHP mail function
Reason
When outgoing email is specified in site settings, the -f parameter is automatically added to sendmail, which specifies the sender name in the "From" field. If site scripts try to override this parameter on their own, when trying to send mail using the PHP mail function, the site may get an error of failure to call this function, like "Could not instantiate mail function" (the error text and the way it is displayed depends on the CMS or framework used). For example, you may encounter this situation when sending mail using the PHPMailer library, which adds the -f parameter by default.
Solution options
- Instead of the mailbox that is specified as outgoing email, select "- Select email -" — this will remove the
-fparameter for sendmail:
- Instead of PHP mail, use sendmail to send directly.
- Instead of PHP mail, use sending via SMTP (recommended method).