PHPMail() is a function used by PHP to send emails directly from a server. However, due to its frequent misuse by malicious users to send spam and other unsolicited emails, we have decided to disable this function by default. This measure is taken to protect the reputation of our IP addresses and network and to ensure that your domains stay off RBLs and blacklists.
Why We Recommend Against Using PHPMail()
When an email is sent from a PHP application using PHP mail, such as a contact form, the message is relayed via the server hostname. However, your PHP application will likely be set to send emails from an alternative email address. Many recipient mailboxes recognise this discrepancy as 'spoofing', which may flag the message as SPAM.
Using SMTP Instead of PHPMail()
We recommend our customers to use an email library or plugin to send emails via SMTP.
Enabling PHPMail() on Your Account
Important: Sending messages via PHPMail() have an incredibly low chance of delivery, and therefore enabling PHPMail() over utilizing SMTP is strongly discouraged.
While we strongly discourage it, if you require PHP mail to be enabled on your domain, you can do so via the PHP Selector in cPanel. Here are the steps:
- Login to your cPanel.
- Click 'Select PHP Version'.
- Select 'Options'.
- Change 'sendmail_path' to '/usr/sbin/sendmail -t -i'.
Please note that enabling PHPMail() may increase the likelihood of your emails being marked as spam by recipient mailboxes. Therefore, it's recommended to use SMTP for sending emails whenever possible.