much work on email template integration