Templating mechanism for emails