interface MailPluginOptions
Since 0.1.0

Options for the MailPlugin factory.

Examples

Example 1

app.register(MailPlugin({
  provider: 'smtp',
  options: { host: 'smtp.example.com', port: 587, auth: { user, pass } },
  defaults: { from: 'noreply@myapp.com' },
}));

Properties

Provider backend. Defaults to 'log'.

Provider-specific options.

optional
defaults: { from?: string; }

Message defaults applied when a message omits the field.

optional
templates: Record<string, MailTemplate>

Named body templates available to sendTemplate.

Usage

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