basalt / mailer/src / MailHeaderInjectionError
Class: MailHeaderInjectionError
Defined in: mailer/src/message.ts:35
Raised when a header-bearing field (subject or an address) carries a CR/LF or an otherwise malformed value — the classic email header-injection vector (\r\nBcc: evil@x.com). Thrown at the single envelope-assembly choke point, so every driver is protected, not just SMTP.
Extends
Constructors
Constructor
> new MailHeaderInjectionError(field, value): MailHeaderInjectionError
Defined in: mailer/src/message.ts:39
Parameters
field
"subject" | "to" | "from" | "cc" | "bcc" | "replyTo"
value
string
Returns
MailHeaderInjectionError
Overrides
Properties
code
> readonly code: string
Defined in: core/src/errors.ts:25
Inherited from
details?
> readonly optional details?: Record<string, unknown>
Defined in: core/src/errors.ts:28
Structured payload passed to the constructor, exactly as given (never sanitised here).
Inherited from
field
> readonly field: "subject" | "to" | "from" | "cc" | "bcc" | "replyTo"
Defined in: mailer/src/message.ts:40
status
> readonly status: 400 = 400
Defined in: mailer/src/message.ts:37
HTTP status for adapters that surface framework errors to clients.
value
> readonly value: string
Defined in: mailer/src/message.ts:41