Implemented code from StackOverflow for getting HTML content and text
content out of a message.