Skip to main content

Transport Options

A union of all the possible transport options for sending emails.

Signature
type EmailTransportOptions = | SMTPTransportOptions    | SendmailTransportOptions    | FileTransportOptions    | NoopTransportOptions    | SESTransportOptions    | TestingTransportOptions

The SMTP transport options of Nodemailer

Signature
interface SMTPTransportOptions extends SMTPTransport.Options {    type: 'smtp';    logging?: boolean;}
  • Extends: SMTPTransport.Options

type

property'smtp'

logging

propertyboolean
Default:false

If true, uses the configured VendureLogger to log messages from Nodemailer as it interacts with the SMTP server.

The SES transport options of Nodemailer

See Nodemailers's SES docs for more details

Example

Ts
import { SES, SendRawEmailCommand } from '@aws-sdk/client-ses' const ses = new SES({    apiVersion: '2010-12-01',    region: 'eu-central-1',    credentials: {        accessKeyId: process.env.SES_ACCESS_KEY || '',        secretAccessKey: process.env.SES_SECRET_KEY || '',    }, }) const config: VendureConfig = {  // Add an instance of the plugin to the plugins array  plugins: [    EmailPlugin.init({      handler: defaultEmailHandlers,      templateLoader: new FileBasedTemplateLoader(path.join(__dirname, '../static/email/templates')),      transport: {        type: 'ses',        SES: { ses, aws: { SendRawEmailCommand } },        sendingRate: 10, // optional messages per second sending rate      },    }),  ],};
Signature
interface SESTransportOptions extends SESTransport.Options {    type: 'ses';}
  • Extends: SESTransport.Options

type

property'ses'

Uses the local Sendmail program to send the email.

Signature
interface SendmailTransportOptions {    type: 'sendmail';    path?: string;    newline?: string;}

type

property'sendmail'

path

propertystring

newline

propertystring

Outputs the email as an HTML file for development purposes.

Signature
interface FileTransportOptions {    type: 'file';    outputPath: string;    raw?: boolean;}

type

property'file'

outputPath

propertystring

raw

propertyboolean

Does nothing with the generated email. Intended for use in testing where we don't care about the email transport, or when using a custom EmailSender which does not require transport options.

Signature
interface NoopTransportOptions {    type: 'none';}

type

property'none'

Forwards the raw GeneratedEmailContext object to a provided callback, for use in testing.

Signature
interface TestingTransportOptions {    type: 'testing';    onSend: (details: EmailDetails) => void;}

type

property'testing'

onSend

property(details: EmailDetails) => void

Callback to be invoked when an email would be sent.

Was this chapter helpful?
Report Issue
Edited Feb 2, 2026·Edit this page