邮件在使用php邮件时直接发送垃圾邮件

时间:2014-06-20 10:25:09

标签: php mailer

每当我使用PHPMailer发送自动电子邮件时,它都会直接进入Gmail中的垃圾邮件文件夹。我自己试图找到解决方案,但我对电子邮件和电子邮件标题不太了解。

任何人都可以解释为什么会这样吗?

public function send(){
        $this->makeMessage();
        $from = $this->from;
        $randomHash = $this->hash;
        $headers = "From: $from\r\nReply-To: $from";
        $headers .= "\r\nContent-Type: multipart/mixed; boundary=\"PHP-mixed-    $randomHash\"";
        $mail_sent = @mail( $this->to, $this->subject, $this->output, $headers );
        return $mail_sent ? true : false;
    }

    }

    $mailer = new AttachMailer("info@bodyshineorganics.com", $_POST['email'], "Bodyshine      Organics Products", 
                            "<b>Hello Dear,<br/><p>Thanks for Taking interest in our     BodyShine organic Products.</p>

    <p>We provide organic products with ingredients organically grown like paddy, black grapes, lotus, roses, sugar cane, bamboo and so on.The product which is result of amazing powers of Indian herbs, roots, flowers and leaves.</p>

    <p>To make your body care experience amazing and royal we are sending you our brochure with wide range of organic body care products.</p>

    <p>To make your shopping experience with us more amazing and handy we are coming soon.Here We are attaching Brochure of Bodyshine Products, So Please Find Attachment.</p></b>");
    $mailer->attachFile("Bodyshine Product Catalog2014.pdf");
    $mailer->send() ? "envoye": "probleme envoi";

    header("Location: index.html");
    ?>

0 个答案:

没有答案
相关问题