wrote code to process emails
merged from email templates