最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
php 利用phpmailer 在线发送邮件
时间:2022-07-02 10:31:11 编辑:袖梨 来源:一聚教程网
html代码
去down.111cn.net教程下载一个phpmailer源码教程
require("mail/class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP(); // set mailer to use SMTP
$mail->Host = "smtp.163.com"; // smtp1.example.com;smtp2.example.comspecify main and backup server
$mail->SMTPAuth = true; // turn on SMTP authentication
$mail->Username = "mailangel123"; // SMTP username
$mail->Password = "*******"; // SMTP password
$mail->From = "[email protected]";
$mail->FromName = "人才自荐";
$Subject =PostGet('tel',1);
$jmail =PostGet('mail',1);
$body =PostGet('bodys',1);
$array ='[email protected]';
$mail->AddReplyTo("[email protected]", "此邮箱无需回复!");
$mail->AddAddress($array,'您好!');
$mail->WordWrap = 50;
$mail->CharSet="GB2312"; // set word wrap to 50 characters
//$mail->AddAttachment("/var/tmp/file.tar.gz"); // add attachments
//$mail->AddAttachment("/tmp/image.jpg", "new.jpg"); // optional name
$mail->IsHTML(true); // set email format to HTML
$mail->Subject = $Subject;
$mail->Body = $body.'
'.$jmail;
//$mail->AltBody = "This is the body in plain text for non-HTML mail clients";
if(!$mail->Send())
{
echo "Message could not be sent.
";
echo "Mailer Error: " . $mail->ErrorInfo;
$mail->ClearAddresses();
$mail->ClearAttachments();
}
else
{
echo "您好,你的信息己经发送到我们负责人信箱,请等候佳声。javascript教程:window.close();">点击
关闭";
}
/* echo ""; */
?>
// 本站原创转载注明来源www.111com.net
相关文章
- 人们熟悉的寄居蟹属于以下哪种分类 神奇海洋11月21日答案 11-21
- 第五人格11.22共研服有什么更新 11月22日共研服更新内容介绍 11-21
- 原神恰斯卡怎么培养 11-21
- 无期迷途四星装束是谁 11-21
- 王者荣耀帝丹高中校服怎么获得 11-21
- 光遇姆明季后续版本怎么玩 11-21