<?php
ob_start();
$i=$_GET['i'];
$i++;
require("phpmailer/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();
$mail->Host = "mail.life-host.net";
$mail->SMTPAuth = true;
$mail->Username = "[email protected]";
$mail->Password = "pass";
$mail->From = $i."@domain.com";
$mail->FromName = "Mailer";
$mail->AddAddress("[email protected]","Name");
$mail->AddReplyTo("[email protected]","Info");
$mail->WordWrap = 50;
$mail->IsHTML(true);
$mail->Subject = "Here is the subject";
$mail->Body = "This is the HTML body";
$mail->AltBody = "This is the text-only body";
if(!$mail->Send())
{
$file = fopen("test.txt", "a");
fwrite($file, $i."не отправленно");
fclose($file);
} else {
$file = fopen("test.txt", "a");
fwrite($file, $i."отправленно");
fclose($file);
}
header ("Location: test.php?i=".$i);
ob_end_flush();
?>