您好我正在尝试通过PHP Mailer发送电子邮件,它输出"消息已发送"但是我的邮箱里没有收到任何电子邮件。 昨天我在我的邮箱收到了一些电子邮件,但是今天我再也没有收到任何电子邮件。
以下是代码示例:
<?php
require 'PHPMailerAutoload.php';
$mail = new PHPMailer;
//$mail->SMTPDebug = 3; // Enable verbose debug output
$mail->isSMTP(); // Set mailer to use SMTP
$mail->Host = 'cp-13.webhostbox.net'; // Specify main and backup SMTP servers
$mail->SMTPAuth = true; // Enable SMTP authentication
$mail->Username = 'hey@handlebar.digital'; // SMTP username
$mail->Password = '******'; // SMTP password
$mail->SMTPSecure = 'ssl'; // Enable TLS encryption, `ssl` also accepted
$mail->Port = 465; // TCP port to connect to
$mail->setFrom('bilalzafar256@gmail.com', 'Mailer');
$mail->addAddress('bilal.zafar@daewoo.com.pk', 'Joe User'); // Add a recipient
$mail->isHTML(true); // Set email format to HTML
$mail->Subject = 'User Response From Website';
$mail->Body = 'This is the HTML message body <b>in bold!</b>';
$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;
} else {
echo 'Message has been sent';
}
?>
谁能告诉我这里的问题是什么?