Skip to content

feat(email): accept custom message headers in sendRaw#3411

Merged
jelveh merged 3 commits into
mainfrom
email-send-recipient-links
Jul 20, 2026
Merged

feat(email): accept custom message headers in sendRaw#3411
jelveh merged 3 commits into
mainfrom
email-send-recipient-links

Conversation

@jelveh

@jelveh jelveh commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Adds an optional headers field to SendMailOptions so callers can set transport-level message headers — needed by the puter-email driver to attach List-Unsubscribe / List-Unsubscribe-Post (RFC 8058 one-click) headers to app-sent mail. Nodemailer already passes headers through at runtime; this is a type-level addition.

Also updates the puter.js Email module JSDoc to document the driver's new recipient protections: every app-sent mail gets an automatic unsubscribe / report-abuse footer, unsubscribed recipients are dropped from future sends and returned in the result's suppressed array, and a send whose to list is entirely unsubscribed is rejected.

Companion to HeyPuter/heyputer#1090 (recipient links, suppression list, abuse-report tracking + security notification).

Lets callers set transport-level headers such as List-Unsubscribe /
List-Unsubscribe-Post. Also documents the puter-email driver's automatic
unsubscribe / report-abuse footer and the new `suppressed` result field
in the puter.js email module.
@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Coverage Report for puter.js SDK

Status Category Percentage Covered / Total
🔵 Lines 31.06%
🟰 ±0%
1940 / 6244
🔵 Statements 30.21%
🟰 ±0%
1993 / 6595
🔵 Functions 29.02%
🟰 ±0%
303 / 1044
🔵 Branches 24.01%
⬆️ +0.09%
1104 / 4598
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/puter-js/src/modules/Email.js 63.63%
🟰 ±0%
0%
🟰 ±0%
75%
🟰 ±0%
63.63%
🟰 ±0%
76-84
Generated in workflow #16 for commit 2d37e55 by the Vitest Coverage Report Action

@github-actions

github-actions Bot commented Jul 20, 2026

Copy link
Copy Markdown
Contributor

Coverage Report

Status Category Percentage Covered / Total
🔵 Lines 76.02%
🟰 ±0%
16262 / 21389
🔵 Statements 74.28%
🟰 ±0%
17308 / 23299
🔵 Functions 72.82%
🟰 ±0%
2701 / 3709
🔵 Branches 62.83%
🟰 ±0%
11315 / 18007
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
src/backend/clients/email/EmailClient.ts 38.23%
🟰 ±0%
19.35%
🟰 ±0%
47.05%
🟰 ±0%
42.62%
🟰 ±0%
7-14, 53-54, 67, 92-152, 160-162
Generated in workflow #545 for commit 2d37e55 by the Vitest Coverage Report Action

jelveh and others added 2 commits July 20, 2026 11:28
…sult 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>
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>
@jelveh
jelveh merged commit f5d6566 into main Jul 20, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant