It is worth reiterating that, as stated above, sendmail_path also works for Windows, overriding other Windows SMTP settings.
The comment in php.ini, "For Unix only", does not make that clear.
This makes it relatively easy to substitute a fake sendmail program or even a shell script/batch file to save mail to a text file.
I use this technique when teaching or testing in PHP.