Skip to content

basalt / mailer/src / MailerOptions

Interface: MailerOptions ​

Defined in: mailer/src/index.ts:48

Extended by ​

Properties ​

from? ​

> optional from?: string | (() => string | undefined)

Defined in: mailer/src/index.ts:53

Default sender. A function is resolved on every send — use it for tenant-aware branding (e.g. read ctx().tenant): () => currentTenantFrom().


layout? ​

> optional layout?: (html, context) => string

Defined in: mailer/src/index.ts:62

Wraps every rendered HTML body in a shared layout (branding, header/footer). Called with the mail's own HTML and its context; return the full document. Read ctx().tenant inside for per-tenant branding. Only applied when the mail has an HTML body. Any template engine (MJML, React Email, Handlebars…) can be used here — or inside a mail's own html().

Parameters ​

html ​

string

context ​
data ​

unknown

mail ​

string

Returns ​

string


replyTo? ​

> optional replyTo?: string

Defined in: mailer/src/index.ts:54

Released under the MIT License.