<html>
<head>
<title>PHPMailer - Mail() basic test</title>
</head>
<body>

<?php

require_once('../class.phpmailer.php');

$mail             = new PHPMailer(); // defaults to using php "mail()"

$body             = file_get_contents('contents.html');
$body             = preg_replace("/[\\\\]/",'',$body);

$mail->AddReplyTo("wadeedkhan@gmail.com","Muhammad Khan");

$mail->SetFrom("wadeedkhan@gmail.com","Muhammad Khan");

$mail->AddReplyTo("wadeedkhan@gmail.com","Muhammad Khan");

$address = "wadeedkhan@bokhara.pk";
$mail->AddAddress($address, "Muhammad Khan");

$mail->Subject    = "PHPMailer Test Subject via mail(), basic";

$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test

$mail->MsgHTML($body);

$mail->AddAttachment("");      // attachment
$mail->AddAttachment(""); // attachment

if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!";
}

?>

</body>
</html>
