added email template preview functionality