Added email template editing and usage selection functionality