updated for email error configuration