Skip to content

Function: sendEmail()

sendEmail(message, from, signal?, options?): Promise<{ from: string; messageId?: string; recipient: string; sent: boolean; }>

Send (SMTP mode) or persist (file/outbox mode) one message from the resolved from address. to (and optional cc / bcc) each accept one or more addresses, and attachments are forwarded as files. The body is rendered by React Email into matching plain-text and HTML MIME alternatives, and the outbox embeds the rendered HTML in a document. In file mode the returned messageId is the path written. Throws when to carries no recipient, when the body or attachments exceed the plugin’s caps, or when from is not permitted by the effective sender allow-list.

The recipient, cap, and sender checks run before the interceptor chain so their specific status and actionable message reach the caller instead of the chain’s stable failure text. signal cancels the send.

object[] = ...

string[] = ...

string = ...

string[] = ...

string = ...

string[] = ...

string

AbortSignal

SendEmailOptions

Promise<{ from: string; messageId?: string; recipient: string; sent: boolean; }>