我正在GoDaddy上设置邮件发送器,我的代码如下:
$mail = new PHPMailer(true);
$mail->IsSMTP();
$mail->SMTPDebug = 3;
$mail->SMTPAuth = false;
$mail->Port = 25;
$mail->Host = "localhost";
$mail->Username = 'username';
$mail->Password = 'password';
$mail->isSendmail();
$mail->From = $email;
$mail->FromName = "Website";
$mail->AddAddress("jn@website.com");
$mail->Subject = "Inquiry - " . $name;
$mail->WordWrap = 80;
$mail->MsgHTML($message);
$mail->IsHTML(true);return $mail->send();
我得到的输出如下:
使用sendmail发送:
Sendmail path: /usr/sbin/sendmail -t -i
Sendmail command: /usr/sbin/sendmail -t -i -oi -ft@t.com -t
Envelope sender: t@t.com
Headers: Date: Wed, 21 Apr 2021 22:43:52 +0000To: jn@website.comFrom: Website <t@t.com>Subject: Inquiry - testMessage-ID: <Km4AQw3yoiFLxzzxLhULZdgQjrgPSBSTT66rxurg4@website.com>X-Mailer: PHPMailer 6.3.0 (https://github.com/PHPMailer/PHPMailer)MIME-Version: 1.0Content-Type: multipart/alternative; boundary="b1_Km4AQw3yoiFLxzzxLhULZdgQjrgPSBSTT66rxurg4"Content-Transfer-Encoding: 8bit
Result: true
问题在于我没有收到这些邮件。
提前感谢您的回复。