Fixed email issue

Fixed issue where email message was not being formatted correctly.