- This topic is empty.
-
AuthorPosts
-
March 20, 2013 at 11:12 am #39724drizzyParticipant
I made a simple contact page and can’t seem to get it running correctly.
Can anyone show me what I’m doing wrong.Thanks
I keep getting an error saying:
> Warning: mail() [function.mail]: SMTP server response: 550 Requested action not taken: mailbox unavailable or not local in C:inetpubvhostscitysightseeingtoronto.comhttpdocscontact_email.php on line 48
Warning: Cannot modify header information – headers already sent by (output started at C:inetpubvhostscitysightseeingtoronto.comhttpdocscontact_email.php:48) in C:inetpubvhostscitysightseeingtoronto.comhttpdocscontact_email.php on line 49>
$spam = $_POST ;
if($spam == NULL){
$pick = $_POST;
$daytour = $_POST;
$cruise = $_POST;
$bus = $_POST;
$attractions = $_POST;
$selection = $_POST;
$theName = $_POST;
$email = $_POST;
$message = $_POST;
if($selection = $pick){
//Redirect to error contact page if “Select Tour” remains empty.
$myURL = “cssto_contact_re.php”;
header (‘Location: $myURL’);
}else if($theName == NULL){
//Redirect to error contact page if “Your Name” remains empty.
$myURL = “cssto_contact_re.php”;
header (‘Location: $myURL’);
}else if($email == NULL){
//Redirect to error contact page if “Your E-mail” remains empty.
$myURL = “cssto_contact_re.php”;
header (‘Location: $myURL’);
}else if($message == NULL){
//Redirect to error contact page if “sthe message” remains empty.
$myURL = “cssto_contact_re.php”;
header (‘Location: $myURL’);
}else if($selection = $daytour){
//ELSE IF myemail = messages directed to City Site Seeing Niagara Infomation email (All messages directed to Niagara Falls Day Tour.
$myemail = “[email protected]”;
$subject = “Citysightseeing Niagara Contact Form”;
$msg = “Client Name:”.$theName.”nnEmail:”.$email.”nnMessage:”.$message;
$extra = $email.”rnReply-To:”.$email.”rn”;
$myURL = “cssto_contact_thankyou.html”;
mail($myemail, $subject, $msg, $extra);
header (‘Location: $myURL’);
}else{
//ELSE myemail = messages directed to City Site Seeing Toronto Information email (All messages directed to Toronto Double-Decker City Tour, Toronto Harbour & Island Cruise and Attractions.
$myemail = “[email protected]”;
$subject = “Citysightseeing Contact Form”;
$msg = “Client Name:”.$theName.”nnEmail:”.$email.”nnMessage:”.$message;
$extra = $email.”rnReply-To:”.$email.”rn”;
$myURL = “cssto_contact_thankyou.html”;
$headers = ‘From:’ . $email . “rn” .
‘Reply-To:’ . $email . “rn” .
‘X-Mailer: PHP/’ . phpversion();
mail($myemail, $subject, $msg, $headers);
header (‘Location: $myURL’);
}
}
?>March 20, 2013 at 4:26 pm #129047drizzyParticipantI’m not sure why, but when I change the send email to anything
e.g [email protected] or [email protected]it works, but if I put anything “”@citysightseeingtoronto.com it doesn’t work and give me the error above.
-
AuthorPosts
- The forum ‘Back End’ is closed to new topics and replies.