@btravstack/mailer / smtp
smtp
Classes
MailerConfig
Defined in: packages/mailer/src/smtp.ts:22
What the graph bound from the environment for the SMTP adapter.
Extends
PortInstance<"MailerConfig", {url:string; }>
Constructors
Constructor
new MailerConfig(): MailerConfig;Defined in: packages/di/dist/index.d.mts:16
Returns
Inherited from
Port("MailerConfig")<{ readonly url: string }>.constructorProperties
| Property | Modifier | Type | Inherited from | Defined in |
|---|---|---|---|---|
[ID] | readonly | "MailerConfig" | Port("MailerConfig").[ID] | packages/di/dist/index.d.mts:12 |
[SERVICE] | readonly | object | Port("MailerConfig").[SERVICE] | packages/di/dist/index.d.mts:13 |
[SERVICE].url | readonly | string | - | packages/mailer/src/smtp.ts:22 |
portId | readonly | "MailerConfig" | Port("MailerConfig").portId | packages/di/dist/index.d.mts:17 |
Variables
smtpSchema
const smtpSchema: ConfigSchema<Readonly<Record<string, string | undefined>>, {
url: string;
}>;Defined in: packages/mailer/src/smtp.ts:29
SMTP_URL, required. One URL rather than a host/port/user/password quartet: it is what the transport takes and what a deployment already stores as one secret. An unset variable is a ConfigInvalid naming it, at graph build.
Functions
smtpMailer()
function smtpMailer(): Module<MailerBackend | HealthChecks, ConfigInvalid, Env | Scope>;Defined in: packages/mailer/src/smtp.ts:128
The SMTP adapter: one pooled transport, opened with the scope and closed with it, and MailerBackend over it. nodemailer is an optional peer reached only through this subpath.
Returns
Module<MailerBackend | HealthChecks, ConfigInvalid, Env | Scope>
smtpMailerBackend()
function smtpMailerBackend(transport): MailerService;Defined in: packages/mailer/src/smtp.ts:43
The adapter's service over a transport. A rejected send becomes a modeled MailNotSent carrying the envelope and the transport's own words — never the body.
Parameters
| Parameter | Type |
|---|---|
transport | Transporter |