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