You'd put the PHP file wherever it makes sense to be put. Just make sure that the URL you use for accessing it reflects the full path to it. If you want a URL like "www.mysite.com/sendEmail.php", then it would go into the root directory. If you want it to be "www.mysite.com/foobar/sendEmail.php", then it goes into the subdirectory "foobar".
"Root directory" is a dangerous term here. What you actually have is known specifically to Apache as documentRoot, as opposed, to, say, the root directory for the entire machine filesystem.
Each website hosted by a webapp server has a documentRoot directory - at least for web programming environments that are predicated on being directory-based. The directory location is a configuration parameter, and for many Linux systems, it's defined by default to be either /var/www or /var/www/html. PHP webapps, however, are often installed in their own directories, and while there are conventions, you can actually put them anywhere you prefer.
Almost. The filesystem root directory would be a very bad choice, for example, since you're potentially exposing the entire OS to be plundered by webapp remote clients.
Loudly announcing something is true and finding out you're wrong makes you feel foolish.
Finding out you're wrong and refusing to admit it makes you LOOK foolish.