How to disable PHPMailer Funtion

KentLong

New member
Joined
Feb 3, 2014
Messages
1
Dear !

i wanna disable phpmailer funtion on Centos 6 . How to do it ? Please Help Me !

Thanks so much !
 
If you would like to disable mail() function completely in PHP, you can add it to disable_functions list (php.ini file).
 
Hope I don't get a golden shovel, but:

When I add "mail" to disable_functions in /usr/local/php74/lib/php.ini and restart the server, nothing happens, and when I do "Bulid php", "mail" disappears.

I found this: https://help.directadmin.com/item.php?id=301

I have created the file /usr/local/php74/lib/php.conf.d/11-custom.ini

I put in it:

disable_functions = mail

it works, but all other disabled features are gone.
So I have to add a full list, e.g .:

disable_functions = mail,exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname

I don't understand this logic. Why can't I turn off php mail globally so that it is turned off with every new PHP version?
 
Back
Top