logging email error