send an email when exception occured