<?php include (' class/class.phpmailer.php '); $config = Array (' Host ' => ' smtp.163.com ', ' Port ' => ', ' user ' => ' * * *, ' passwd ' =&G t; '
', ' from ' => ' juva_zz@163.com ', ' fromname ' => ' Zhengzhou ',);
$subject = ' This is a test mail '; $body = ' <table style= background: #dfdfdf ' ><tr><td> test content </TD></TR><TR><TD
> This is Content </td></tr></table> ';
$address = ' 379018082@qq.com ';
$username = ' I ';
$mail = new Phpmailer ();
$mail->charset = ' gb2312 ';
$mail->issmtp ();
$mail->host = $config [' Host '];
$mail->port = $config [' Port '];
$mail->from = $config [' from '];
$mail->fromname = $config [' FromName '];
$mail->smtpauth = true;
$mail->username = $config [' user '];
$mail->password = $config [' passwd '];
$mail->subject= $subject;
$mail->altbody= "text/html";
$mail->msghtml ($body);
$mail->addaddress ($address, $username); if (! $mail->send ()) {echo MaIl Error: ". $mail->errorinfo;} else {echo "Congratulations on sending success!" ";
}