简体   繁体   English

使用JavaMail API IMAP阅读邮件的回复日期

[英]Read the replied date for a mail using JavaMail API IMAP

I am currently reading mail details via IMAP. 我目前正在通过IMAP阅读邮件详细信息。 I am able to collect all the details of Sender, subject and date received. 我能够收集发件人的所有详细信息,主题和收到日期。 If the mail has been replied, I need to collect the replied date as well. 如果邮件已被回复,我也需要收集回复日期。 In the mail snapshot attached I am able to see "You replied to this message on" tag with date and time. 在附件的邮件快照中,我可以看到带有日期和时间的“您已回复此邮件”标签。 Is it possible to get the replied date from the current mail using the JavaMail API? 是否可以使用JavaMail API从当前邮件中获取回复日期?

“您回复”快照

That date is the Date field of a message whose References contain the Message-ID of the message you're currently looking at. 该日期是邮件的“日期”字段,其“引用”包含您当前正在查看的邮件的“邮件ID”。

So what you need to do is store your message's message-id, then look for another message in that mailbox that's from the user and mentions that message-id in its References field, and finally you can use that other message's Date. 因此,您需要做的是存储消息的message-id,然后在该邮箱中查找来自用户的另一条消息,并在其“引用”字段中提及该message-id,最后您可以使用该另一条消息的Date。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM