Refactoring to optimize the email message implementation.