strip_tags() function can be used to remove all tags from the HTML and return text .
how to use strip_tags() ?
$html = '<p> this is testing for strip_tags()</p>';
echo strip_tags($html);
you simply need to pass the HTML to strip_tags() as an argument and it removes all HTML tags and returns only texts
i am not sure how you get mail HTML from the mail provider. Good luck !!