Skip to content

The easy-to-use open source Business Intelligence and Embedded Analytics tool that lets everyone work with data :bar_chart:

555 B
Raw Blame
import { PLUGIN_SMTP_OVERRIDE } from "metabase/plugins";
import { hasPremiumFeature } from "metabase-enterprise/settings";

import {
  CloudSMTPConnectionCard,
  SMTPOverrideConnectionForm,
} from "./components";

/**
 * Initialize SMTP override plugin features that depend on hasPremiumFeature.
 */
export function initializePlugin() {
  if (hasPremiumFeature("cloud_custom_smtp")) {
    PLUGIN_SMTP_OVERRIDE.CloudSMTPConnectionCard = CloudSMTPConnectionCard;
    PLUGIN_SMTP_OVERRIDE.SMTPOverrideConnectionForm =
      SMTPOverrideConnectionForm;
  }
}