Enabling PHPMail() on your hosting account

PHP mail() Function Disabled by Default

PHP mail() is a function that allows PHP applications to send email directly from the server. Because it is often abused to send spam or unsolicited messages, it is disabled by default.

This helps protect our server IP addresses and network reputation, and reduces the risk of your domain being added to RBLs or email blacklists.

Why We Do Not Recommend PHP mail()

When a PHP application, such as a contact form, sends mail through PHP mail(), the message is usually sent using the server hostname.

However, the application may use a different sender email address, such as [email protected]. Many receiving mail servers treat this mismatch as possible sender spoofing, which can cause the email to be filtered as spam or rejected.

Use SMTP Instead

We strongly recommend sending email through SMTP rather than PHP mail().

SMTP authentication sends messages through a valid mailbox and mail server, which generally improves delivery rates and reduces the chance of messages being marked as spam.

You can configure SMTP using an email library, plugin, or your application’s email settings.

Enable PHP mail() on Your Account

Important: Email sent through PHP mail() has a very low delivery success rate. Using SMTP is strongly recommended.

If you still need to enable PHP mail() for your domain, follow these steps in cPanel:

1. Log in to cPanel.
2. Open Select PHP Version.
3. Click Options.
4. Locate the sendmail_path setting.
5. Set it to:

/usr/sbin/sendmail -t -i

Enabling PHP mail() may increase the likelihood of your messages being classified as spam. Whenever possible, use SMTP for more reliable email delivery.