Resolves instances of yahoo messages sent with phpmailer

  • 2020-06-19 09:54:25
  • OfStack


<?php
require_once('../class.phpmailer.php');
$mail= new PHPMailer();
$body= " I finally succeeded in sending the email! Ha ha! goodboy ! <br/><a>http://news.qq.com/a/20111115/000792.htm?qq=0&ADUIN=594873950&ADSESSION=1321316731&ADTAG=CLIENT.QQ.3493_.0</a>";
// using SMTP Send E-mail 
$mail->IsSMTP();
// Mail server 
$mail->Host       = "smtp.mail.yahoo.com.cn";
$mail->SMTPDebug  = 0;
// use SMPT validation 
$mail->SMTPAuth   = true;
//SMTP The name of the user to verify 
$mail->Username   = "********@yahoo.cn";
//SMTP Verification secrets 
$mail->Password   = "y*********";
// Set encoding format 
$mail->CharSet  = "utf-8";
// Set the theme 
$mail->Subject    = " test ";
//$mail->AltBody    = "To view the message, please use an HTML compatible email viewer!";
// Set sender 
$mail->SetFrom('*******@yahoo.cn', 'test');
// using html Format mail sending 
$mail->MsgHTML($body);
// Recipient mail name 
$mail->AddAddress("*********@yahoo.com", "test");// Send E-mail 
if(!$mail->Send()) {
  echo "Mailer Error: " . $mail->ErrorInfo;
} else {
  echo "Message sent!";
}

Related articles: