\n";
echo "
".obt_translate("Send this post by email")."
";
IF ($obt_is_spam) echo "".obt_translate("Error").". ".obt_translate("The email could include spam and hasn't been delivered").".
";
ELSEIF (count($obt_errors)){
echo "".obt_translate("Error").". ".obt_translate("Check the following data").":
\n";
echo "\n";
IF ($obt_errors["send-to"]) echo "\t- ".obt_translate("Email")."
\n";
IF ($obt_errors["send-name"]) echo "\t- ".obt_translate("Your name")."
\n";
IF ($obt_errors["send-email"]) echo "\t- ".obt_translate("Your email")."
\n";
echo "
\n";
}ELSE{
$obt_subject = obt_html_decode(obt_translate("Post submission on %1",get_bloginfo("name")));
$obt_message = obt_html_decode(obt_translate("%1 thinks this post will be of interest to you",$_POST["send-name"])).":\n\n";
$obt_message .= "{$obt_post_title}\n{$obt_post_url}\n\n";
$obt_message .= "--\n".get_bloginfo("name")."\n".get_option("home");
$obt_message = wordwrap($obt_message,70);
$obt_headers = "From: {$_POST["send-name"]} <{$_POST["send-email"]}>\n";
$obt_headers .= "Message-ID: <".md5(time())."@".preg_replace("'^www\.'","",strtolower($_SERVER["HTTP_HOST"])).">\n";
$obt_headers .= "X-Mailer: PHP version ".phpversion()."\n";
$obt_headers .= "MIME-Version: 1.0\n";
$obt_headers .= "Content-type: text/plain; charset=\"".get_option("blog_charset")."\"\n";
@ini_set("sendmail_from",$_POST["send-email"]);
IF (@mail($_POST["send-to"],$obt_subject,$obt_message,$obt_headers)) echo "".obt_translate("Thank you").". ".obt_translate("The post has been sent to the specified email address").".
";
ELSE echo "".obt_translate("Error").". ".obt_translate("Email couldn't be sent").".
";
@ini_restore("sendmail_from");
};
echo "\n";
};
IF ($_SERVER["REQUEST_METHOD"] == "GET" || count($obt_errors)) include(TEMPLATEPATH."/send-form.php");
?>