mail template and some adjust