require_once 'PHPMailer/class.phpmailer.php';
$mail->From = $address;
$mail->FromName = $name;
//To address and name
$mail->addAddress("example92@gmail.com", "Mr Example");
//Address to which recipient will reply
$mail->addReplyTo($address, $name);
//Send HTML or Plain Text email
$mail->Subject = "Sent from example.in";
$mail->Body = htmlentities($msg);
我使用IIS作为设置SMTP配置的服务器。 使用我的代码显示它没有抛出任何错误和$ mail-send()工作正常,只有邮件没有传递到收件箱。