Make email sending more robust