In java mail, when i parse an replied email, how can I take only the latest message (the reply) and ignore the old ones?
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With