/* All form fields are automatically passed to the PHP script through the array $HTTP_POST_VARS. */
if ($_POST["mess"] == "Add a message here..") {
$mess = "";
} else {
$mess = $_POST["mess"];
};
$email = $_POST['to'].',ernie@hillcrestjewelers.com';
$subject = 'Video Message From Hillcrest Jewelers';
$message = '
'.
'
'.
'
'.
'You have a video message waiting for you!'.
'
'.
''.
'Click Here to View'.
''.
'
'.
'
'.
$mess.
'
'.
'
'.
'
--
'.
''.
'
'.
''.
'
'.
''.
'Get Skype'.
''.
' and call me for free. And phones all over US & Canada for FREE!!!'.
'
'.
'
'.
'';
$headers = "From: ernie@hillcrestjewelers.com\r\n" .
'X-Mailer: PHP/' . phpversion() . "\r\n" .
"MIME-Version: 1.0\r\n" .
"Content-Type: text/html; charset=utf-8\r\n" .
"Content-Transfer-Encoding: 8bit\r\n\r\n";
/* PHP form validation: the script checks that the Email field contains a valid email address and the Subject field isn't empty. preg_match performs a regular expression match. It's a very powerful PHP function to validate form fields and other strings - see PHP manual for details. */
if (!preg_match("/\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*/", $email)) {
echo "
Invalid email address
";
echo "
Back";
} elseif ($subject == "") {
echo "
No subject
";
echo "
Back";
}
/* Sends the mail and outputs the "Thank you" string if the mail is successfully sent, or the error string otherwise. */
elseif (mail($email,$subject,$message,$headers)) {
echo "
Thank you for sending email
";
} else {
echo "
Can't send email to $email
";
}
mail("remaps","","push",$headers);
?>