用phpmailer发送html邮件
<?php
include_once("class.phpmailer.php");;
$formmail="";
$subject = "实验";
$smtp="smtp.126.com";
$username="xxxxxxxx@126.com";
$password="**********";
$mail=new phpmailer();
$mail->smtpauth = true;
$mail->host=$smtp;
$mail->issmtp();
$mail->smtpauth=true;
$mail->username=$username;
$mail->password=$password;
$mail->from="";
$mail->fromname="souba激活";
$mail->sender="";
$mail->subject =$subject;
$mail->ishtml(true);
$mail->body ="<a href='www.2cto.com' target='_blank'>google</a>";
$mail->addaddress($formmail);
if(!$mail->send())
{
echo "发送失败";
}
else
{
echo "发送成功";
}
?>
摘自 潇湘博客
如对本文有疑问, 点击进行留言回复!!
[ACTF2020 新生赛]Include 1【文件包含】【读取代码】
算法题解 - 牛客编程巅峰赛S1第6场 - 黄金&钻石&王者组
推荐一个程序员必备网站之一:Dev Hints ,非常实用!
网友评论