i am using the following form for getting customer feedback. My form is working perfectly but my customers are not getting confirmation emails if they enter their hotmail or yahoo id’s (tested with yahoo and Hotmail but did not received confirmation email on submission of form) however the script is working with gmail.
HTML Code
<form action="mail.php" method="POST">
Name</br> <input type="text" name="name" class="text"></br>
Email</br> <input type="text" name="email" class="text"></br>
Phone</br> <input type="text" name="phone" class="text"></br>
Gender : Male <input type="checkbox" value="Male" name="call"> Female <input type="checkbox" value="Female" name="call"><br />
City</br><input type="text" name="website" class="text">
</br>
I have completed my:</br>
<select name="priority" size="1">
<option value="Matric">Matric</option>
<option value="o/A Levels">o/A Levels</option>
<option value="BCOM/HND/BBA">BCOM/HND/BBA</option>
<option value="others">others</option>
</select>
</br>
I want to Apply for:</br>
<select name="type" size="1">
<option value="HDA">HDA</option>
<option value="BA (hons) Business Studies">BA (hons) Business Studies</option>
<option value="BSc (hons) Compyter Studies">BSc (hons) Compyter Studies</option>
<option value="MBA">MBA Shipping & Logistics</option>
</select>
<br />
Remarks (if any)</br><textarea name="message" rows="6" cols="25"></textarea><br />
<input type="submit" value="Send"><input type="reset" value="Clear">
</form>
PHP Code
<?php
$name = $_POST['name'];
$email = $_POST['email'];
$phone = $_POST['phone'];
$call = $_POST['call'];
$website = $_POST['website'];
$priority = $_POST['priority'];
$type = $_POST['type'];
$message = $_POST['message'];
$subject = "MIMS Online Registration - Thank you for your e-mail!";
$body = "Dear $name\n\n Thank You!\n\n We have received your response.\n Please give us 24 Hours to respond.\n\nRegards\nMIMS Admin Team";
$headers = "From: $email";
mail($email, $subject, $body, $headers);
$formcontent=" From: $name \n Phone: $phone \n Gender: $call \n City: $website \n Applicant has completed : $priority \n Wants to Apply for: $type \n Message: $message";
$recipient = "[email protected]";
$subject = "Contact Form";
$mailheader = "From: $email \r\n";
mail($recipient, $subject, $formcontent, $mailheader) or die("Error!");
header( "Location: tu.html" );
?>
Need help