Parsing instances sent by yahoo mail using phpmailer _ PHP Tutorial

Source: Internet
Author: User
Parse instances sent by phpmailer for yahoo Mail. Copy the code as follows :? Phprequire_once (... class. phpmailer. php); $ mailnewPHPMailer (); $ body I finally sent the email! Haha! Goodboy! Branews. qq. coma The code is as follows:


Require_once ('../class. phpmailer. php ');
$ Mail = new PHPMailer ();
$ Body = "I finally sent the email! Haha! Goodboy!
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.mail.yahoo.com.cn ";
$ Mail-> SMTPDebug = 0;
// Use SMPT for verification
$ Mail-> SMTPAuth = true;
// SMTP-verified user name
$ Mail-> Username = "******** @ yahoo.cn ";
// SMTP Authentication secret
$ Mail-> Password = "y *********";
// 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 ('******* @ yahoo.cn', 'test ');
// Send emails in html format
$ Mail-> MsgHTML ($ body );
// Recipient's email name
$ Mail-> AddAddress ("********** @ yahoo.com", "test"); // send an email
If (! $ Mail-> Send ()){
Echo "Mailer Error:". $ mail-> ErrorInfo;
} Else {
Echo "Message sent! ";
}

The http://www.bkjia.com/PHPjc/327809.htmlwww.bkjia.comtruehttp://www.bkjia.com/PHPjc/327809.htmlTechArticle code is as follows :? Php require_once ('../class. phpmailer. php'); $ mail = new PHPMailer (); $ body = "I finally sent the email! Haha! Goodboy! Br/ahttp: // news.qq.com/...

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.