Add base logic to MailMessageFactory.