|
Send an e-mail request. Please fill out the * required fields.";
}
elseif (($Name == "") || ($WeddingDate == "") || ($Ceremony == "") || ($Phone == "") || ($Email == ""))
{
$ask = 1;
echo " You missed some field. ";
}
if ($ask == 1)
{
echo "";
}
else
{
$message = "Name: $Name\nWedding Date: $WeddingDate\nCeremony & Reception Location: $Ceremony\nPhone: $Phone\nEmail: $Email\nComments: $Comments\n";
$eLog="/tmp/mailError.log";
$fh=fopen($eLog, "a+");
fclose($fn);
$originalsize = filesize($eLog);
if (preg_match('/^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]{2,4}$/', $Email, $matches)) {
print ("Sending your request to Megan's Flowers (cc: to you) ....... br> br>");
mail ($to, "Request From A Bride-To-Be", $message, "Cc:$Email");
} else {
print ("Sending your request to Megan's Flowers ....... br> br>");
mail ($to, "Request From A Bride-To-Be", $message);
}
clearstatcache();
$finalsize = filesize($eLog);
//Check if the error log was just updated
if ($originalsize != $finalsize) {
print "
There was a problem sending the mail. Please try again later or send the message to$to using your own mail client progam.";
} else {
echo "Thank you for your message, $Name. ";
}
}
?>
|