Better detection of email error