I've been trying to get the latest content from the gmail message. Gmail only gives me raw message with thread content merge below it. Is there any way I can at least parse new message or remove/get old content?
Asked
Active
Viewed 211 times
0
-
you mean new mail? @RakshitVats – Divyesh Kanzariya Dec 31 '18 at 10:04
-
yes any message I pick from the thread I need to remove extra content from it i.e last thread response – Rakshit Vats Dec 31 '18 at 11:23
-
use message API just pass message id : https://developers.google.com/gmail/api/v1/reference/users/messages/get – Divyesh Kanzariya Dec 31 '18 at 13:26
-
I can get the message from that but its not removing the past thread responses from the mail. Latest messages always has past thread responses. For ex.
when is the meeting?. I want to calculate the tone of each message so I need only the actual message. – Rakshit Vats Jan 01 '19 at 05:51 -
According to previous threads: [31439613](https://stackoverflow.com/questions/31439613/), [28103227](https://stackoverflow.com/questions/28103227/), [42298961](https://stackoverflow.com/questions/42298961/), this is not possible to do with the API. You'll have to manually parse the message with your program. Or, as Jay Lee said from the first thread, you may just want to do what Gmail and many other modern emails apps do and collapse/hide any reply text which begins with >. – Jacque Jan 02 '19 at 06:47
-
I think gmail doesn't parse it with > now. how can I detect the forwarded message part now? – Rakshit Vats Jan 07 '19 at 06:08