function createProvider
createProvider(
ctx: IPluginContext
): MailProvider

Builds the provider adapter for the configured backend.

Parameters

The provider backend id

Provider-specific options

ctx: IPluginContext

The plugin context (for ctx.logger on the log provider)

Return Type

MailProvider

The provider adapter

Throws

Error

If the provider type is unsupported

Usage

import { createProvider } from "mail-plugin/src/index.ts";