- Reach us By Phone 888-828-8778
$emailTo="jobs@klezmerconnection.com,klezmerconnection@hotmail.com"; function isValidEmail($email){ return preg_match("/^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$/i", $email); } $txtName=''; $txtMail=''; $txtPhone=''; $txtMsg=''; $err=false; $txtNameError=''; $txtPhoneError=''; if($_POST['strAction']=='MAIL'){ $txtName=trim($_POST['txtName']); $txtMail=trim($_POST['txtEmail']); $txtPhone=trim($_POST['txtPhone']); $txtMsg=$_POST['txtMsg']; if($txtName==""){ $err=true; $txtNameError="Please Enter a Name"; } if($txtMail==""){ $err=true; $txtMailError="Please Enter an Email"; }else if(!isValidEmail($txtMail)){ $err=true; $txtMailError="Please Enter a Valid Email"; } if(!$err){ $body="\r\n Name: $txtName \r\n\r\n Email: $txtMail \r\n\r\n Phone: $txtPhone \r\n\r\n Comments: $txtMsg \r\n\r\n"; $to = $emailTo; $from = $txtMail; $subject = 'Email from KlezmerConnection.com from '.$from; $message = $body; $headers = 'From: '.$from. "\r\n" . 'Reply-To: '.$from . "\r\n" . 'X-Mailer: PHP/' . phpversion(); if(mail($to, $subject, $message, $headers)) header('Location: thankyou.php'); else { echo "ERROR SENDING MAIL"; exit(0); } } } ?>