DRY of the html_parts and text_parts methods
Refactored with hash
Merge pull request #1071 from Ortuna/refactor-mail

DRY of the html_parts and text_parts methods