EmailPluginOptions

EmailPluginOptions

EmailPluginOptions

Configuration for the EmailPlugin.

Signature

interface EmailPluginOptions {
  templatePath: string;
  transport: EmailTransportOptions;
  handlers: EmailEventHandler[];
  globalTemplateVars?: { [key: string]: any };
}

Members

templatePath

property
type:
string
The path to the location of the email templates. In a default Vendure installation, the templates are installed to <project root>/vendure/email/templates.

transport

property
Configures how the emails are sent.

handlers

property
An array of EmailEventHandlers which define which Vendure events will trigger emails, and how those emails are generated.

globalTemplateVars

property
type:
{ [key: string]: any }
An object containing variables which are made available to all templates. For example, the storefront URL could be defined here and then used in the “email address verification” email.

EmailPluginDevModeOptions

Configuration for running the EmailPlugin in development mode.

Signature

interface EmailPluginDevModeOptions extends Omit<EmailPluginOptions, 'transport'> {
  devMode: true;
  outputPath: string;
  mailboxPort?: number;
}

Members

devMode

property
type:
true

outputPath

property
type:
string
The path to which html email files will be saved rather than being sent.

mailboxPort

property
type:
number
If set, a “mailbox” server will be started which will serve the contents of the outputPath similar to a web-based email client, available at the route /mailbox, e.g. http://localhost:3000/mailbox.