问题描述
我正在使用java邮件处理IMAP客户端。我们目前需要创建一个按会话群组功能,用户可以将邮件视为对话(请参阅Gmail邮件如何回复和转发)我可以从服务器检索邮件,但是在收到的邮件中,
回复的邮件与实际的邮件融合,并被视为实际的邮件内容。
例如:初始邮件:
< div>这是初始邮件< / div>
回复邮件:
这是回复邮件< br>< br>
< div class =gmail_quote>
在2009年8月26日星期四下午4:26,[censored]
< span dir =ltr>& lt
< a href =mailto:[censored] @ [censored] .com>
[censored] @ [censored] .com
< / a>
& gt
< / span>写道:其中峰; br>
< blockquote class =gmail_quotestyle =PADDING-LEFT:1ex; MARGIN:0px 0px 0px 0.8ex; BORDER-LEFT:#ccc 1px solid>
< div>这是初始邮件。< / div>
< div>< / div>
< / blockquote>
< / div>
< br>
如上所示,没有迹象表明什么是实际的和什么是回复的邮件,那么怎么可以提供像gmail这样的分组(不管从哪里读取邮件的服务器)?
消息的来源可以通过查看以下标题将消息彼此相关:
消息ID:< 097819EBC7F79F4A850C8F088D35927302442A82AA @ xxxxxxxxxxxxxxxxxxx>
参考文献:< 4A8BE8F3.2060007@xxxxxxxxxxxxxx>
回覆者:< 4A8BE8F3.2060007@xxxxxxxxxxxxxxx>
I am working on an IMAP client using java mail. We currently have a requirement of creating a "group by conversation" feature where user can view mails as conversation (Refer to how gmail groups mails that are replied and forwarded)
I am able to retrieve mails from the server, but in the mail parts i recieve,the replied mail is "fused" with actual mail and is treated like actual mail content.
eg: initial mail:
<div>This is the initial mail.</div>
replied mail:
This is the response Mail<br><br>
<div class="gmail_quote">
On Wed, Aug 26, 2009 at 4:26 PM, [censored]
<span dir="ltr"><
<a href="mailto:[censored]@[censored].com">
[censored]@[censored].com
</a>
>
</span> wrote:<br>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">
<div>This is the initial mail.</div>
<div></div>
</blockquote>
</div>
<br>
as shown above, there is no indication of what was actual and what was replied mail, how then is it possible to provide a grouping like gmail (regardless of server from where mail is read from)?
If you get the raw source of the messages you can relate messages to one another by looking at the following headers:
Message-ID: <097819EBC7F79F4A850C8F088D35927302442A82AA@xxxxxxxxxxxxxxxxxxx>
References: <4A8BE8F3.2060007@xxxxxxxxxxxxxx>
In-Reply-To: <4A8BE8F3.2060007@xxxxxxxxxxxxxxx>
这篇关于我可以跟踪IMAP邮件回复吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!