3
<title>PHPMailer - Mail() basic test</title>
9
require_once('../class.phpmailer-lite.php');
11
$mail = new PHPMailerLite(); // defaults to using php "Sendmail" (or Qmail, depending on availability)
13
$mail->IsMail(); // telling the class to use native PHP mail()
15
$body = file_get_contents('contents.html');
16
$body = eregi_replace("[\]",'',$body);
18
$mail->SetFrom('name@yourdomain.com', 'First Last');
20
$address = "whoto@otherdomain.com";
21
$mail->AddAddress($address, "John Doe");
23
$mail->Subject = "PHPMailer Test Subject via mail(), basic";
25
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
27
$mail->MsgHTML($body);
29
$mail->AddAttachment("images/phpmailer.gif"); // attachment
30
$mail->AddAttachment("images/phpmailer_mini.gif"); // attachment
33
echo "Mailer Error: " . $mail->ErrorInfo;