Skip to main content
zerotal

Documentation


Documentation / @zerotal/notifications / MailConfigShape

Interface: MailConfigShape

Defined in: notifications/src/types.ts:47

Mail-channel settings (driver selection + the default sender + credentials).

Properties

driver

driver: "log" | "smtp" | "resend"

Defined in: notifications/src/types.ts:49

Transport for the mail channel. Default: 'log' (prints to console).


from

from: object

Defined in: notifications/src/types.ts:51

Default From address, used unless a MailMessage overrides it with from().

address

address: string

name

name: string


smtp

smtp: object

Defined in: notifications/src/types.ts:56

SMTP options (used when driver === 'smtp').

host

host: string

port

port: number

secure

secure: boolean

TLS on connect (port 465); false = plain, upgraded via STARTTLS when offered (port 587).

username

username: string

password

password: string

allowInsecureAuth?

optional allowInsecureAuth?: boolean

Send credentials even when the connection is not encrypted. Off by default: AUTH LOGIN/PLAIN are base64, so a plaintext session hands the password to anyone on the path. Turn on only for a trusted local relay.

rejectUnauthorized?

optional rejectUnauthorized?: boolean

Reject servers presenting an untrusted certificate. Default: true.

timeoutMs?

optional timeoutMs?: number

Per-reply timeout in milliseconds. Default: 30000.

clientName?

optional clientName?: string

Name sent in the EHLO greeting. Default: 'zerotal'.


resend

resend: object

Defined in: notifications/src/types.ts:77

Resend options (used when driver === 'resend').

apiKey

apiKey: string


log

log: object

Defined in: notifications/src/types.ts:81

Log options (used when driver === 'log').

channel

channel: string

'console' writes to stdout; a path writes to a file.