Fix email configuration when initializing API