$mail = new PHPMailer(); $mail->IsSMTP(); // set mailer to use SMTP $mail->Host = "zipzap.office.aol.com"; // specify main and backup server $mail->SMTPAuth = false; // turn on SMTP authentication $mail->From = "MDP@zipzap.com"; $mail->FromName = "Your local MDP database"; $mail->AddAddress("mpthompson06@aol.com", "Mike Thompson"); $mail->AddAddress("kung_fu_mike@yahoo.com"); // name is optional $mail->AddReplyTo("info@example.com", "Information"); $mail->WordWrap = 50; // set word wrap to 50 characters $mail->IsHTML(true); // set email format to HTML $mail->Subject = "Here is the subject"; $mail->Body = $message; $mail->AltBody = "This is the body in plain text for non-HTML mail clients"; if(!$mail->Send()) { echo "Message could not be sent.
"; echo "Mailer Error: " . $mail->ErrorInfo; exit; }