You should break this down into pieces. First, make sure your mail server is set up (99.9% chance it is but just be sure)
make a page <?php
$emailTo = 'firstname.lastname@example.org';
$subject = $_REQUEST['subject'];
echo mail('email@example.com','test','test','From: firstname.lastname@example.org'); //that should be enough to get through
note the echo - you should see a 1 if it is working
you can check mail logs as well. Also try emailing to another address and see if your send addr. is not rejecting it
Once you know this works then just build it up step by step. Good post, but learn to trouble-shoot in small pieces - and welcom to PHP!
Hey! You may have inadvertently stumbled onto some genius there! :-)
Thank you very much for your response and suggestions.
It already works. I don't know why but the mail address I was using doesn't work. But if I send an email from another mail address, it works. It is an account from google business and, as the "from" mail address is not validated, the mail server could be filtering. Nevertheless, with a gmail account (but not business) it works.