• 冒险村物语
  • 英雄无敌3塔防
  • 驾考家园手游

简单测试PHPMailer发送邮件

2014-09-05

require './class.phpmailer.php';
$mail=new PHPMailer();
$mail->ContentType="text/html";
$mail->Encoding="base64";
$mail->IsSMTP();
$mail->Host="smtp.163.com";
$mail->SMTPAuth=true;
$mail->Username="test@163.com";
$mail->Password="123456";
$mail->SetFrom("test@163.com","test");
$content=<<<EMAIL
这是一封测试的邮件,请不要做过多的关注!
EMAIL;
$mail->Subject="邮件测试";
$mail->AddAddress("test@qq.com","newMail");
$mail->Body=$content;
if($mail->Send()){
 echo "发送成功!";
}else{
 echo "发送失败!".$mail->ErrorInfo;
}
(免责声明:文章内容如涉及作品内容、版权和其它问题,请及时与我们联系,我们将在第一时间删除内容,文章内容仅供参考)

人气推荐

知识阅读

精彩推荐

  • 游戏
  • 软件
查看更多>>