I couldn't send mail with this script..I am not getting any errors..But the mail is not coming ? Please explain..
Code: Select all
$mailto = 'jstgermain@methodcomptech.com' ;
$subject = "MCT Web Mail" ;
$formurl = "http://www.methodcomptech.com/methodemail.html" ;
$errorurl = "http://www.methodcomptech.com/error.html" ;
$thankyouurl = "http://www.methodcomptech.com/success.html" ;
$name = $_POST['name'] ;
$email = $_POST['email'] ;
$phone = $_POST['phone'] ;
$website = $_POST['website'] ;
$comments = $_POST ['comments'] ;
$http_referrer = getenv ( "HTTP_REFERER" );
if (!isset($_POST['email' ])) {
header( "Location: $formurl" );
exit ;
}
if (empty( $name) || empty($email) || empty($comments)) {
header( "Location: $errorurl" );
exit ;
}
if (get_magic_quotes_gpc ()) {
$comments = stripslashes( $comments );
}
$messageproper =
"This message was sent from: " . $name .
"\n$http_referrer\n\n" .
"________________________( COMMENTS )________________________\n\n" .
"\nName: " . $name .
"\nE-Mail: " . $email .
"\nPhone Number: " . $phone .
"\nWeb-Site: " . $website .
"\n\nMessage: \n" . $comments .
"\n\n____________________________________________________________\n" ;
mail ($mailto, $subject, $messageproper, "From: \"$name\" <$email>\nReply-To: \"$name\" <$email>\nX-Mailer: feedback.php" );
header ( "Location: $thankyouurl" );
exit ;Navaneeth