if($_POST)
{
include_once('function/gen_mail.inc.php');
$contact_name = $_POST['contact_name'];
$contact_email = $_POST['contact_email'];
$contact_msg = $_POST['contact_msg'];
if(strlen($contact_msg)>100)
{
$contact_msg = substr($contact_msg,0,100);
}
$mail_status = gen_sendContact($contact_email,$contact_msg);
$autoreply_status = gen_sendAutoReply($contact_email,$contact_name);
if($mail_status && $autoreply_status)
{
header('Location: index.php?file=thank_msg');
}
}
?>