最新下载
热门教程
- 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
相关文章
- 《无限暖暖》天星之羽获得位置介绍 12-20
- 《流放之路2》重铸台解锁方法介绍 12-20
- 《无限暖暖》瞄准那个亮亮的成就怎么做 12-20
- 《无限暖暖》魔气怪终结者完成方法 12-20
- 《无限暖暖》曙光毛团获得位置介绍 12-20
- 《无限暖暖》日光果获得位置介绍 12-20