163 of emails are sent using phpmailer (detailed instance description ). Copy the code as follows :? Phprequire_once (... class. phpmailer. php); $ mailnewPHPMailer (); $ body I finally sent the email! Haha! Branews. qq. coma20111115
The code is as follows:
Require_once ('../class. phpmailer. php ');
$ Mail = new PHPMailer ();
$ Body = "I finally sent the email! Haha!
Http://news.qq.com/a/20111115/000792.htm? Qq = 0 & ADUIN = 594873950 & ADSESSION = 1321316731 & ADTAG = CLIENT. QQ.3493 _. 0 </a> ";
// Use SMTP to send emails
$ Mail-> IsSMTP ();
// Email server
$ Mail-> Host = "smtp.163.com ";
$ Mail-> SMTPDebug = 0;
// Use SMPT for verification
$ Mail-> SMTPAuth = true;
// SMTP-verified user name
$ Mail-> Username = "******** @ 163.com ";
// SMTP Authentication secret
$ Mail-> Password = "***";
// Set the encoding format
$ Mail-> CharSet = "UTF-8 ";
// Set the topic
$ Mail-> Subject = "test ";
// $ Mail-> AltBody = "To view the message, please use an HTML compatible email viewer! ";
// Set the sender
$ Mail-> SetFrom ('***** @ 163.com', 'test ');
// Send emails in html format
$ Mail-> MsgHTML ($ body );
// Recipient's email name
$ Mail-> AddAddress ("*** @ 163.com"," test "); // send an email
If (! $ Mail-> Send ()){
Echo "Mailer Error:". $ mail-> ErrorInfo;
} Else {
Echo "Message sent! ";
}
The http://www.bkjia.com/PHPjc/327810.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327810.htmlTechArticle code is as follows :? Php require_once ('../class. phpmailer. php'); $ mail = new PHPMailer (); $ body = "I finally sent the email! Haha! Br/ahttp: // news.qq.com/a/20111115 /...