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 = 'contact@domain.es';
$subject = $_REQUEST['subject'];
$name=$_REQUEST['name'];
$msg=$_REQUEST['msg'];
echo mail('youremail@you.com','test','test','From: testing@you.com'); //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!
Sam
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.
Bookmarks