[英]My SMTP Email Send Always in SPAM
我正在開發一個網站,您可以在其中通過電子郵件查詢我們的問題。 每次發送郵件時,它總是發送垃圾郵件,這是我的代碼:
$fname = $_POST['fname'];
$lname = $_POST['lname'];
$phone = $_POST['phone'];
$city = $_POST['city'];
$QuestionComment = $_POST['comments'];
$hear = $_POST['about_us'];
$email_address = $_POST['email'];
// the first email is for thank you! email
date_default_timezone_set('Asia/Manila');
$mail = new PHPMailer();
$body = "Hi,<br /> <br />Thank you for contacting Magosaburo Philippines. <br />Please await for a confirmation email regarding your reservations and other concerns.";
$mail->IsSMTP(); // telling the class to use SMTP
$mail->Host = "mail.magosaburo.com.ph"; // SMTP server
$mail->SMTPDebug = 2; // enables SMTP debug information (for testing)
// 1 = errors and messages
// 2 = messages only
$mail->SMTPAuth = true; // enable SMTP authentication
$mail->Host = "mail.magosaburo.com.ph"; // sets the SMTP server
$mail->Port = 25; // set the SMTP port for the GMAIL server
$mail->Username = "//dont mind it"; // SMTP account username
$mail->Password = "//dont mind it"; // SMTP account password
$address = $email_address;
$mail->AddAddress($address);
$mail->Subject = "Thank you from Magosaburo";
$mail->AltBody = "To view the message, please use an HTML compatible email viewer!"; // optional, comment out and test
$mail->SetFrom('send_mail@magosaburo.com.ph', 'Magosaburo');
$mail->AddReplyTo("send_mail@magosaburo.com.ph",'Magosaburo');
$mail->MsgHTML($body);
if(!$mail->Send())
{
echo "Mailer Error: " . $mail->ErrorInfo;
}
else
{
echo "Message sent!";
}
我是php電子郵件發送中的新手,我不知道它為什么或為什么進入垃圾郵件。 謝謝!
在郵件中使用DK / DKIM簽名可能會有所幫助。
這是因為事實。 電子郵件提供商對電子郵件發件人有自己的偏好。 如果您發送電子郵件的服務器基於惡意軟件。 電子郵件公司將阻止它們。 基本上是因為用戶已經將服務器標記為垃圾郵件。 並且新的電子郵件將發送到垃圾郵件!
嘗試添加更多信息。 像簽名一樣。 或者嘗試閱讀有關如何刪除或向電子郵件服務發送請求的用戶指南,以檢查您發送的電子郵件不是惡意軟件!
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.