Converting from HTML to text isn't that difficult, there are a number of open source libraries that'll do it. The harder problem is if someone sends you an email with a lot of images or where the layout of content is important, which is why people typically use HTML, it's much harder to map those aspects to plain text.