The following script works with phpmailer 1.5, but it says there is a syntax problem with the From line when I use phpmailer 2.0.3.
Any suggestions are welcomed!
Todd
require_once("class.phpmailer.php");
$mail = new phpmailer();
$mail->IsSMTP();
$mail->IsHTML(false);
$mail->Host = "mail.host.com";
$mail->SMTPAuth = true;
$mail->Username = "user";
$mail->Password = "password";
$mail->From = "#####@gmail.com";
$mail->FromName = "Todd Cary";
$mail->Subject = "Test message";
$mail->AddAddress("#####@#####.com");
$mail->Body = "Hey buddy, here is an email!";
$mail->Send();
if($mail->Send()) {
echo "Email sent <br>";
} else {
echo "Message could not be sent. <br>";
echo "Mailer Error: " . $mail->ErrorInfo . "<br>";
}
[Obscured email addresses -- MOD]