<?
/*
* Hail is a PHP-Hotmail gateway. It will allow you to
* check your hotmail account via any webserver with PHP.
*
* Created by: Craig Marshall <hide@address.com> and
* Justin Carlson <hide@address.com>, 30-May-2003
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2, or (at your option)
* any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA
* 02111-1307, USA.
*/
require("MailFolderItem.class.php");
require("MailFolder.class.php");
require("HTTPMail.class.php");
header("Content-type: text/html; charset=utf-8");
header("Expires: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Last-Modified: " . gmdate("D, d M Y H:i:s") . " GMT");
header("Cache-Control: no-store, no-cache, must-revalidate");
header("Cache-Control: post-check=0, pre-check=0", false);
header("Pragma: no-cache");
@ini_set("session.use_cookies", 0);
@ini_set("session.use_trans_sid", 1);
session_start();
flush();
if (isset($_SESSION['hail']['hm'])) {
$_SESSION['hail']['hm']->send_email($_POST['to'], $_POST['cc'], $_POST['bcc'], $_POST['subj'], $_POST['body']);
echo "<html>";
echo "<script>";
echo "top.COMPOSE.composeTargetIframeLoaded(true,'','" . $_POST['send'] . "');";
echo "</script>";
echo "</html>";
} else { // not logged in
$_SESSION['hail']['sess_user'] = "";
$_SESSION['hail']['sess_pass'] = "";
echo "<html>";
echo "<script>";
echo "top.COMPOSE.composeTargetIframeLoaded(false, 'Your login expired', '" . $_POST['send'] . "');";
echo "</script>";
echo "</html>";
}
?>