if ($_POST['UseIt']=="true"){
$x2="שליחת הדואר נכשלה";
if($_POST['captcha'] != $_SESSION['digit']){ die("");session_destroy();}
if ($_POST['Cname']!="" and ($_POST['eMail']!="" or $_POST['Cphone']!="" )){SendGeneralMailIfOkHome();}
else{
echo "
";}
}
function SendGeneralMailIfOkHome(){
////////////////Send Mail to try the system
$headers = "From:barger-filters
\r\n";
$headers .= "content-type: text/html; charset=UTF-8\r\n";
$headers .= 'X-Mailer: PHP/' . phpversion();
$to = 'shlomi@yhg.co.il';
//$to=get_bloginfo('admin_email');
$subject = "התקבלה פנייה חדשה מאתר האינטרנט.";
$bodyNo2= "שם" . "
" . $_POST['Cname'] . "
מספר טלפון" . "
" . $_POST['Cphone'] . "
אימייל" . "
" . $_POST['eMail'] . "
ישוב" . "
" . $_POST['City'] . "
הודעה" . "
" . $_POST['Message'] ;
mail($to, $subject, $bodyNo2,$headers);
{
echo "
";
}
}
?>