Add functions for composing email in external mailer