Email Plugin Types

Email Plugin Types

SetTemplateVarsFn

A function used to define template variables available to email templates. See EmailEventHandler.setTemplateVars().

Signature

type SetTemplateVarsFn<Event> = (
    event: Event,
    globals: { [key: string]: any },
) => { [key: string]: any }

EventWithContext

A VendureEvent which also includes a ctx property containing the current RequestContext, which is used to determine the channel and language to use when generating the email.

Signature

type EventWithContext = VendureEvent & { ctx: RequestContext }

SMTPCredentials

The credentials used for sending email via SMTP

Signature

interface SMTPCredentials {
  user: string;
  pass: string;
}

Members

user

property
type:
string
The username

pass

property
type:
string
The password

EmailDetails

The final, generated email details to be sent.

Signature

interface EmailDetails {
  from: string;
  recipient: string;
  subject: string;
  body: string;
}

Members

from

property
type:
string

recipient

property
type:
string

subject

property
type:
string

body

property
type:
string