簡體   English   中英

我的SMTP電子郵件始終以SPAM發送

[英]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簽名可能會有所幫助。

如果只是將gmail歸類為垃圾郵件,則您可能會被列入黑名單, 這是一些有關如何擺脫垃圾郵件的信息 然后是標題,在此SO post上有一個標題示例在起作用 和finaly,通過電子郵件基礎電子郵件有一些額外的提示在這里

摘要:1.檢查您的IP是否確實在Google的垃圾郵件列表中。 2.使用標題,以便為過濾器提供有關電子郵件的更完整信息。 3.解決任何潛在的“垃圾郵件外觀”內容。

祝好運!

這是因為事實。 電子郵件提供商對電子郵件發件人有自己的偏好。 如果您發送電子郵件的服務器基於惡意軟件。 電子郵件公司將阻止它們。 基本上是因為用戶已經將服務器標記為垃圾郵件。 並且新的電子郵件將發送到垃圾郵件!

嘗試添加更多信息。 像簽名一樣。 或者嘗試閱讀有關如何刪除或向電子郵件服務發送請求的用戶指南,以檢查您發送的電子郵件不是惡意軟件!

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM