fix crash without email configuration