Send an email when a error occurred