为什么我的电子邮件仍然被接收为垃圾邮件?使用mail()函数 [英] Why is my e-mail still being picked up as spam? Using mail() function

查看:1805
本文介绍了为什么我的电子邮件仍然被接收为垃圾邮件?使用mail()函数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我一直很懊恼,因为无论什么似乎垃圾邮件过滤器仍然称我的网站自动回复为垃圾邮件。我已经设置了所有的标题正确,这是我迄今为止!

  $ headers =From:Name< name @ website.com> \r\\\

。返回路径:名称< name@website.com> \r\\\

。回复:名称< name @ website.com> \r\\\

。Message-ID:<。 time().rand(1,1000)。 @。$ _ SERVER ['SERVER_NAME']。> \r\\\

。X-Mailer:PHP v.phpversion()。\r\\\

。MIME-Version:1.0\r\\\

。Content-Type:text / plain; charset = iso-8859-1\r\\\
;

@mail($ _ POST ['email'],Subject,Message,$ headers);

请帮助我这个! :)



这是从我的共享主机提供商服务器发送。



如果我添加第五个参数如下?


- f email@website.com



解决方案

你读过吗?



所以你想发送一些电子邮件(通过代码)



简而言之:


  1. 确保电脑发送该电子邮件具有反向PTR记录

  2. 在DNS和代码中配置DomainKeys标识的邮件

  3. 在DNS中设置SenderID记录


I've been getting very annoyed at this as no matter what it seems spam filters are still calling my websites auto responder as spam. I've set all my headers correctly and this is what I have so far!

$headers = "From: Name<name@website.com>\r\n"
        ."Return-Path: Name<name@website.com>\r\n"
        ."Reply-To: Name<name@website.com>\r\n"
        ."Message-ID: <". time() .rand(1,1000). "@".$_SERVER['SERVER_NAME'].">\r\n"
        ."X-Mailer: PHP v".phpversion()."\r\n"
        ."MIME-Version: 1.0\r\n"
        ."Content-Type: text/plain; charset=iso-8859-1\r\n";

        @mail($_POST['email'], "Subject", "Message", $headers);

Please help me on this one! :)

This is being sent from my shared hosting providers servers.

would it help if I added the 5th parameter as below?

"-f email@website.com"

解决方案

Have you read this?

So You'd Like to Send Some Email (Through Code)

In a nutshell:

  1. Make sure the computer sending the email has a Reverse PTR record
  2. Configure DomainKeys Identified Mail in your DNS and code
  3. Set up a SenderID record in your DNS

这篇关于为什么我的电子邮件仍然被接收为垃圾邮件?使用mail()函数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆