mirror of
https://github.com/HeyPuter/puter.git
synced 2026-08-26 16:07:13 +00:00
feat(email): document per-recipient best-effort delivery via failed
The email-send driver now attempts every recipient's private delivery even when one fails, returning failed addresses in the result's `failed` array instead of failing the whole call — so callers retry only the failed subset and never re-mail delivered recipients. Adds the field to the public EmailSendResult typing and module docs. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
@@ -27,6 +27,11 @@ import * as utils from '../lib/utils.js';
|
||||
* Recipients who unsubscribe are dropped from future sends — they come
|
||||
* back in the result's `suppressed` array — and a send whose `to` list
|
||||
* is entirely unsubscribed is rejected.
|
||||
*
|
||||
* Each recipient gets a private delivery. A recipient whose delivery
|
||||
* fails comes back in the result's `failed` array (everyone else got
|
||||
* their copy — retry with just those addresses); the call only rejects
|
||||
* when no recipient could be delivered.
|
||||
*/
|
||||
class Email {
|
||||
/**
|
||||
|
||||
+6
@@ -42,6 +42,12 @@ export interface EmailSendResult {
|
||||
cost: number;
|
||||
/** Recipients omitted because they opted out of this sender's mail. */
|
||||
suppressed: string[];
|
||||
/**
|
||||
* Recipients whose delivery attempt failed. Everyone else got their
|
||||
* copy — retry with just these addresses. A send where every delivery
|
||||
* fails rejects instead.
|
||||
*/
|
||||
failed: string[];
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user