if ($_POST)
{
echo 'Спасибо, вам сейчас перезвонят.
Это окно автоматически закроется через 5 секунд.
';
require("admin/phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$body = $_POST['name'].' - '.$_POST['phone'];
$body = eregi_replace("[\]",'',$body);
$mail = new PHPMailer();
$mail->IsSMTP(); // telling the class to use SMTP
$mail->SMTPDebug = 0; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->SMTPSecure = "ssl"; // sets the prefix to the servier
$mail->Host = "smtp.gmail.com"; // sets GMAIL as the SMTP server
$mail->Port = 465; // set the SMTP port for the GMAIL server
$mail->Username = "outbox@doubletone.ru"; // GMAIL username
$mail->Password = "dbltnoutbox"; // GMAIL password
$mail->CharSet = "utf-8";
$mail->SetFrom('outbox@doubletone.ru', 'Система рассылки');
$mail->AddReplyTo("outbox@doubletone.ru","Система рассылки");
$mail->Subject = "Позвони мне, позвони - Обратный звонок с сайта";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->MsgHTML($body);
$address = "info@doubletone.ru";
$mail->AddAddress($address, "doubletone.ru");
$mail->Send();
}
else
{
echo '