I am working on reading mail body from mail so, my current scenario i can receive reply or forward mails in this case i am able get full body of mail but issues is i need to get recent reply mail body content in mail.
Thank you for your response, This Sample mail body from Reply mail
For example:
Thank you for changing password.
From: P venugopal Sent: Thursday, October 15, 2020 7:15 PM To: Shaik Mohammad Mahamm. Raphi Subject: Password reset
Hi Team,
Kindly change the my password.
User name: gneelima.
Regards,
Neelima.
Expected Output: Text should be anything but i need to get mail content from recent reply or forward mail
How to get mail content i.e., Thank you for changing password.
Test this instead: (.|\n)+?(?=From:(.|\n)+Sent:)
It will give you several matches if there’re several “From Sent” in the text. Just pick the first match or use RegEx.Match().