require_once( '../../../wp-load.php' );
/************************
* Variables you can change
*************************/
$mailto = $_POST['sendto'];
$name = ucwords($_POST['name']);
$subject = $_POST['subject']; // Enter the subject here.
$email = $_POST['email'];
$message = $_POST['message'];
if(strlen($_POST['name']) < 1 ){
echo 'email_error';
}
else if(strlen($email) < 1 ) {
echo 'email_error';
}
else if(strlen($message) < 1 ){
echo 'email_error';
} else {
if(!isValidEmail($email)) { echo "email_error"; exit; }
//subject and the html message
$messages = '
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
Name : ' . stripslashes($name) . '
Mail : ' . $email . '
Subject : ' . stripslashes($subject) . '
Message : ' . stripslashes($message) . '
';
$headers = "MIME-Version: 1.0" . "\r\n";
$headers .= "Content-type:text/html;charset=utf-8" . "\r\n";
$headers .= "From: " . stripslashes($name) . " <" . $email . ">" . "\r\n";
$headers .= "Sender-IP: " . $_SERVER["SERVER_ADDR"] . "\r\n";
$headers .= "Priority: normal" . "\r\n";
$headers .= "X-Mailer: PHP/" . phpversion();
$Message_Body = utf8_decode($messages);
//send the mail
wp_mail( $mailto, $Message_Body, $subject,$headers );
$susu = __('Thanks, your message was successfully sent!','ebiz');
echo $susu;
exit;
}
function isValidEmail($email){
return eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email);
}
?>
bana kalırsa iş $Message_Body = utf8_decode($messages); buradan kaynaklanıyor şimdiden sağolun arkadaşlar...