implemented mail template editing