Disable PHPMailer

Disable PHPMailer


If your server installed cPanel with CloudLinux along alt-php and you want to disable php mail() function for one domain, then you can do this using the following steps :



1. Logged into your server via SSH and Edit /etc/cl.selector/php.conf file.



2. Add below lines at the top of this file:


Directive = sendmail_path
Default = /usr/sbin/sendmail -t -i
Type = list
Range = /usr/sbin/sendmail -t -i,/bin/true
Comment = Switch to /bin/true to disable php mail


3. Then, logged into client's cpanel, change the sendmail path to /bin/true using "Select PHP Version > Switch to PHP Settings".


The account will no longer be able to send via php mail.
  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

How to generate/download a full backup

A full backup is a backup of all of your files, e-mail, databases, etc. To run a full backup, you...

How to create an FTP account in cPanel

An FTP account is used for uploading and managing files on your website. An FTP account is...

cPanel logs for access, Apache, email, error, ftp, mysql, and WHM

cPanel logs for access, Apache, email, error, ftp, mysql, and WHM cPanel logs most activity that...

Default Mail Addresses in cPanel

Default Mail Addresses in cPanel Category: Technical Support If you manage a domain, sooner...

How to Stop Email Spam Bots Using SMTP on Your VPS

How to Stop Email Spam Bots Using SMTP on Your VPS The Problem The email said that I had...