自定义标题邮件()和垃圾邮件分数 [英] Custom header mail() and spam score

查看:122
本文介绍了自定义标题邮件()和垃圾邮件分数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在构建一个邮件客户端,它使用一个唯一的标识符来识别(duh)一个会话,并通过这样创建一个线程。
此唯一ID现在附加到主题行。除了主题行中的id之外,邮件会丢失。



除了这个事实之外,还可以修改主题行,如果我可以将id添加到自定义标题如下:

  $ to ='nobody@example.com'; 
$ subject ='主题';
$ message ='hello';
$ headers ='来自:网站管理员< webmaster@example.com>'。 \\\\。
'Reply-To:webmaster@example.com'。 \\\\。
'X-myID:MghT3s'。 \\\\。
'X-Mailer:PHP /'。 phpversion();

mail($ to,$ subject,$ message,$ headers);

这可能吗?邮箱会收到更高的垃圾邮件分数吗?



//编辑
通过使用自定义标题回复发送电子邮件,标题不是正在转移,所以这确实不是一个解决方案。



// edit2
我正在查看in-reply-to标题。但是不知道是否使用了所有电子邮件客户端。

解决方案

是的,不,你可能不会得到更高的垃圾邮件评分。以'X-'开头的头是合法的扩展头。其中有许多与垃圾邮件过滤软件,电子邮件分发列表等有关。



扩展标题不是表示垃圾邮件的表面证据。 p>

但是您确定不想使用In-Reply-To标题或现有的唯一消息ID(Message-ID)来构建一个线程吗?


I'm building a mail client which uses a unique identifier to identify (duh) a conversation and by doing so creating a thread. This unique id is now attached to the subject line. Without the id in the subject line the mail gets 'lost'.

Besides the fact it clothers the subject line it would be much handier if i could add the id to a custom header like so:

$to      = 'nobody@example.com';
$subject = 'the subject';
$message = 'hello';
$headers = 'From: Webmaster <webmaster@example.com>' . "\r\n" .
    'Reply-To: webmaster@example.com' . "\r\n" .
    'X-myID: MghT3s' . "\r\n" .
    'X-Mailer: PHP/' . phpversion();

mail($to, $subject, $message, $headers);

Is this possible? And would the mail get a higher spam score by doing so?

//edit By replying to the send email with the custom header, the header is not being transfert, so this is indeed not a solution.

//edit2 I'm looking into the in-reply-to header. But don't know if it's used by all email clients.

解决方案

Yes, it's possible, and no, you probably won't get a higher spam score. Any header beginning with 'X-' is a legitimate extended header. There are many of these, having to do with spam filtering software, email distribution lists, etc.

Having an extended header is not prima facie evidence of being spam.

But are you sure you don't want to use the In-Reply-To header or the existing unique message IDs (Message-ID) to build a thread?

这篇关于自定义标题邮件()和垃圾邮件分数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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