added mail template support