5

In java mail, when i parse an replied email, how can I take only the latest message (the reply) and ignore the old ones?

4

2 回答 2

1

I think you're asking about parsing the text content of the message to ignore the parts that are just previous messages that have been included in the response.

There's no well-defined way to do this. You're going to need to apply some heuristics to try to guess which parts of the text are these "quoted" messages. A common convention is that these messages are lines that start with ">", but that's not universal nor guaranteed.

于 2013-06-08T00:17:30.237 回答
0

我解决了这个问题,<backquote> </backquote>如果原始电子邮件是作为 HTML 电子邮件接收的,我会删除它的部分内容,并删除以>文本电子邮件开头的行。

于 2013-06-10T08:23:01.607 回答