add email emplate
add logger for email error