Reinitialize the email client after an error.
Added more email configuration options.