feat(email): envelope override in sendRaw + suppressed in EmailSendResult type

Adds an optional `envelope` field to SendMailOptions so callers can set
transport recipients independently of the visible To/Cc headers (used by
the email-send driver for per-recipient deliveries), and adds the
`suppressed: string[]` field to the public EmailSendResult typing to
match the driver's documented result.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
jelveh
2026-07-20 11:28:13 -07:00
co-authored by Claude Fable 5
parent f6e6a3186c
commit d625fa46ea
2 changed files with 8 additions and 1 deletions
+5
View File
@@ -45,6 +45,11 @@ export interface SendMailOptions {
to: string;
cc?: string;
bcc?: string;
/** Optional transport recipients when they differ from visible headers. */
envelope?: {
from?: string;
to: string;
};
subject: string;
html?: string;
text?: string;
+3 -1
View File
@@ -36,10 +36,12 @@ export interface EmailSendOptions {
}
export interface EmailSendResult {
/** Transport message id, when the mail server reports one. */
/** First transport message id reported for this send, when available. */
messageId: string | null;
/** Total charge for this send, in microcents. */
cost: number;
/** Recipients omitted because they opted out of this sender's mail. */
suppressed: string[];
}
/**