Hi,
I have setup up the contact form and mailer.php script, however when i submit the contact form and set the $to = to a yahoo email i do not receive any emails.
When i set it to info@mydomainname.co.uk it works?
Seems like its not working for some emails?
Can anyone help or know why i cant receive them?
HTML
<form id="sendemail" method="post" action="mailer.php"> <ol> <li> <label for="name">Name (required)</label> <input type="text" name="name" class="validate[required] text" id="name" /> </li> <li> <label for="email">Email Address (required)</label> <input type="text" name="email" class="validate[required,custom[email]] text" id="email" /> </li> <li> <label for="subject">Subject</label> <input type="text" name="subject" id="subject" class="text" /> </li> <li> <label for="message">Your Message</label> <textarea value="" class="validate[required,length[6,1000]] message" name="message" id="message" rows="8" cols="50" /> </textarea> </li> <li> <input type="image" value="Submit" name="submit" id="imageField" src="images/submit.gif" class="submit" /> <div class="clr"></div> </li> </ol> </form>
PHP MAILER SCRIPT
<?PHP $to = "name@isp.co.uk"; $subject = "Results from your Request Info form";$headers = "From: warrington-kitchen-installations.co.uk";$forward = 1;$location = "thank-you.html";
$date = date ("l, F jS, Y"); $time = date ("h:i A");
$msg = "Below is the result of your feedback form. It was submitted on $date at $time.
";
if ($_SERVER['REQUEST_METHOD'] == "POST") { foreach ($_POST as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "
"; }}else { foreach ($_GET as $key => $value) { $msg .= ucfirst ($key) ." : ". $value . "
"; }}
mail($to, $subject, $msg, $headers); if ($forward == 1) { header ("Location:$location"); } else { echo "Thank you for submitting our form. We will get back to you as soon as possible."; }
?>
Thanks
Paul