版本:PHPMailer_v2.0.4

<?php
require("class.phpmailer.php");
$mail = new PHPMailer();
$mail->IsSMTP();   
$mail->Host = "smtp.163.com";   
$mail->Port=25;
$mail->SMTPAuth = true;   
$mail->Username = "xxxx@163.com";     // SMTP用户名
$mail->Password = "xxxxx";     // SMTP密码
$mail->From = "xxxxx@163.com";     //发件人地址
$mail->FromName = "xxx";     //发件人
$mail->AddAddress("xcvxvzv@qq.com");
$mail->AddReplyTo("xxxx@163.com", "Information");    //回复地址
$mail->WordWrap = 50;     //设置每行字符长度
$mail->IsHTML(true);     // 是否HTML格式邮件
$mail->Subject = "Here is the subject";     //邮件主题
$mail->Body = "HERE is the message";     //邮件内容
$mail->AltBody = "This is the body in plain text for non-HTML mail clients";    //邮件正文不支持HTML的备用显示

if(!$mail->Send())
{
  echo "Message could not be sent. <p>";
  echo "Mailer Error: " . $mail->ErrorInfo;
  exit;
}

echo "Message has been sent";
?>

Phpmailer配置Phpmailer配置

相关文章:

  • 2022-01-16
  • 2021-12-01
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-01
  • 2021-07-26
  • 2022-12-23
猜你喜欢
  • 2021-11-29
  • 2022-12-23
  • 2021-09-27
  • 2022-12-23
  • 2021-11-15
  • 2021-07-28
  • 2021-12-25
相关资源
相似解决方案