added extra variable to email_exception method