Handle exceptions when sending notification emails