"; } else if(!preg_match('/[a-zA-Z_x7f-xff][a-zA-Z0-9_x7f-xff]*/',$_POST['yourname'])) { $flag=0; echo "Please Enter Valid Name
"; } if($_POST['email']=='') { $flag=0; echo "Please Enter E-mail
"; } else if(!eregi("^[_a-z0-9-]+(.[_a-z0-9-]+)*@[a-z0-9-]+(.[a-z0-9-]+)*(.[a-z]{2,3})$", $_POST['email'])) { $flag=0; echo "Please Enter Valid E-Mail
"; } if($_POST['subject']=='') { $flag=0; echo "Please Enter Subject
"; } if($_POST['message']=='') { $flag=0; echo "Please Enter Message"; } if ( empty($_POST) ) { print 'Sorry, your nonce did not verify.'; exit; } else { if($flag==1) { wp_mail(get_option("admin_email"),trim($_POST[yourname])." sent you a message from ".get_option("blogname"),stripslashes(trim($_POST[message])),"From: ".trim($_POST[yourname])." <".trim($_POST[email]).">rnReply-To:".trim($_POST[email])); echo "Mail Successfully Sent"; } } } ?>