没有回复的线程:消息ID? [英] Threading without In-Reply-To: Message-ID?

查看:97
本文介绍了没有回复的线程:消息ID?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

因此,我们的系统正在向我们发送有关特定事件的电子邮件通知.问题是,事情真的变得非常垃圾和混乱,我们真的希望收到有关同一事件的电子邮件客户端(Gmail)线程通知.

So our system is sending us email notifications regarding specific incidents. The problem is, things get really spammy and disorganized, and we really want to have our email client (Gmail) thread notifications regarding the same incident.

例如:

发送有关事件1的电子邮件1. 已发送有关事件1的电子邮件2.

Email 1 is sent about incident 1. Email 2 is sent about incident 1.

Gmail将它们显示在自己的线程中,而我们希望它们在同一线程中显示为答复".

我认为我所需要的只是添加"Re:Subject Line",但这是行不通的.然后,我读到了ReferencesIn-Reply-To标头,但是这些标头需要存储消息ID,如果可以的话,我们希望避免开销.

I thought all I needed was to append "Re: Subject Line" but that doesn't work. Then I read about the References and In-Reply-To headers, but these require storing message IDs and we'd want to avoid the overhead if we can.

是否有解决方法,可以让客户对收到的有关同一主题的电子邮件进行线程处理,而不必存储消息ID并将其添加到In-Reply-To标头中?

非常感谢您!

注意:使用PHPMailer

Note: Using PHPMailer

推荐答案

您真的无法解决这个问题.您必须具有某物来唯一地标识一条消息,并且就电子邮件消息而言,这是消息ID,并且也正是ReferencesIn-Reply-To标头所引用的东西,因此你真的无法摆脱它. 必须使用邮件标头实现,因为所有电子邮件客户端都普遍支持该标头.

You really can't get around this. You must have something that uniquely identifies a message, and as far as email messages go, that something is the message ID, and that's also exactly the thing referenced by References and In-Reply-To headers, so you really can't get away from that. It has to be implemented using message headers because that's universally supported by all email clients.

就像电子邮件本身一样,确定性线程算法现在已经很老了,但是您可以找到它这里,它仍然和以往一样有效.我使用这种方法来实现 chamsocial.com社交网络中使用的电子邮件线程.

The definitive threading algorithm, is, like email itself, now very old, but you can find it here, and it's still as valid as it ever was. I used that approach to implement the email threading used in the chamsocial.com social network.

一些电子邮件客户端尝试在不使用消息ID的情况下进行线程连接,这几乎总是失败-我有时会看到Apple Mail在ID丢失时执行此操作,将完全不相关的消息拖到线程中只是因为它们碰巧具有相同的主题

Some email clients try to do threading without using message IDs, and it's almost always a failure - I sometimes see Apple Mail doing this when IDs are missing, pulling completely unrelated messages into a thread just because they happen to have the same subject.

如果您想在没有消息ID的情况下进行消息线程化,则需要考虑一些行为以完全相同的方式进行-这是没有意义的,因此最好不要动弹并适当地实现消息ID支持.

If you wanted to do message threading without message IDs, you'd need to think up something that acts in exactly the same way - which is pointless, so you're best off biting the bullet and implementing message ID support properly.

这篇关于没有回复的线程:消息ID?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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