send email when exception occurs.