Location: PHPKode > projects > Progetto e3g > e3g_0.19.2/libraries/phpmailer/examples/test1.php
<?php

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

$mail    = new PHPMailer();

$body    = $mail->getFile('contents.html');

$body    = eregi_replace("[\]",'',$body);

$mail->From     = "hide@address.com";
$mail->FromName = "First Last";

$mail->Subject = "PHPMailer Test Subject";

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

$mail->MsgHTML($body);

$mail->AddAddress("hide@address.com", "John Doe");

if(!$mail->Send()) {
  echo 'Failed to send mail';
} else {
  echo 'Mail sent';
}

?>
Return current item: Progetto e3g