Please help with form email
Posted: Tue Nov 08, 2005 1:32 pm
Hello,
I took over this site which has several forms which are processed by their relative .php scripts.
So far none are functioning. Is there a problem with this code?:
note - i have changed the real email addresses for this post
Many thanks in advance!
I took over this site which has several forms which are processed by their relative .php scripts.
So far none are functioning. Is there a problem with this code?:
note - i have changed the real email addresses for this post
Code: Select all
<?php
$myname = "Promise Magazine";
$myemail = "emailaddress@domain.com";
$contactname = "Promise Magazine Hostmaster";
$contactemail = "emailaddress@domain.com";
$cBody = $cBody . "Name: " . $name . "<br> ";
$cBody = $cBody . "Email: " . $email . "<br> ";
$cBody = $cBody . "City, State: " . $city . "<br> ";
$cBody = $cBody . "Zip or Country Code: " . $zip . "<br> ";
$cBody = $cBody . "Phone 1: " . $phone1 . "<br> ";
$cBody = $cBody . "Comments: " . $comments . "<br> ";
$subject = "Promise Magazine - Comments from " . $name;
$headers = "MIME-Version: 1.0\r\n";
$headers = $headers . "Content-type: text/html; charset=iso-8859-1\r\n";
$headers = $headers . "From: ".$myname." <".$myemail.">\r\n";
$headers = $headers . "To: ".$contactname." <".$contactemail.">\r\n";
$headers = $headers . "Reply-To: ".$myname." <".$myreplyemail.">\r\n";
$headers = $headers . "X-Priority: 1\r\n";
$headers = $headers . "X-MSMail-Priority: High\r\n";
$headers = $headers . "X-Mailer: Email Server";
mail($contactemail, $subject, $cBody, $headers);?>