This question seems to my mind to be fundamentally different to the suggested duplicate. My requirements are very specific. If someone can tell me what I need to do to make this question acceptable, please do. I've tried three times now.
I want to use the php mail() function on a completely isolated machine running apache.
I want the contents of the email to be logged in a local text file.
Ideally I'd like a solution that works on both Windows7 and Ubuntu 14.04
I do not want to install any software other than apache and php unless absolutely necessary. I don't know if sendmail is part of apache, or if I need to install it separately.
I have tried this in php.ini and restarted apache:
sendmail_path = 'cat > /home/****/Desktop/*****/dev/*******/email/mail.txt'
to no avail. If only life were that simple.