This will probably work only if one have access to the global PHP configuration / server admin

A method on how to disable mail() function for selected directory/directories.

I do it like this:

Open "/usr/local/lib/php.ini" (if its empty then you have it in different location, find it)

Modify following lines and insert them at the bottom of the opened php.ini file:

[PATH=/home/myusername/public_html/webdirectory]
;disable_functions = "show_source, system, passthru, shell_exec, popen, proc_open, allow_url_fopen"
disable_functions = "show_source, system, passthru, shell_exec, popen, proc_open, allow_url_fopen, mail"
Save and try to send mail from the directory or sub-directories of the PATH=
It should complain that mail function is disabled.