I am using Gmail mailbox and get the message using imap_fetchbody. By default, if the message is a reply to a previous message, it contains the previous message. How can I get the message without the previous message?
Note that we use 2 languages, so it might be a problem to cut the message where there is a ">". For example, suppose this is my message:
תגובה בעברית
בתאריך יום א׳, 23 במאי 2021 ב-17:28 מאת ... <shanishalel89@gmail.com
>:
> reply on it
>
> בתאריך יום א׳, 23 במאי 2021 ב-17:05 מאת <emoodlesmessage@gmail.com>:
>
>> only English
>
>
and I get it as string, I can cut where I have '>'. but the second line will remain.