Skip to content

feat(send): per-send from/fromName email overrides#9

Merged
tuyakhov merged 1 commit into
mainfrom
claude/gallant-einstein-qu8jtz
Jul 8, 2026
Merged

feat(send): per-send from/fromName email overrides#9
tuyakhov merged 1 commit into
mainfrom
claude/gallant-einstein-qu8jtz

Conversation

@tuyakhov

@tuyakhov tuyakhov commented Jul 8, 2026

Copy link
Copy Markdown
Contributor

Summary

Adds optional per-send From overrides on email sends — parity with the
TypeScript SDK — with identical behavior on templated (send) and raw
(send_raw) sends:

  • from_ (wire field from) — From address override (bare address).
    Previously accepted on send_raw only; now also on send.
  • from_name (wire field fromName) — new on both: From display name
    override, rendered by the server as Name <address>.

Either field can be set on its own; both fall back to the provider connection's
configured values. On managed sending, the from_ address is honored only on
the workspace's verified sending domain, while from_name always applies.

Changes

  • TemplateSend gains from_ and from_name; RawSend gains from_name
    (it already had from_). Both serialize to the from / fromName wire
    fields, and null values are pruned as before.
  • send() and send_raw() accept the new keyword arguments on both the sync
    and async clients.

Tests / verification

  • Added coverage for from/fromName serialization on templated and raw sends.
  • pytest — 62 pass; mypy and ruff clean.
  • README updated.

🤖 Generated with Claude Code


Generated by Claude Code

…w sends

Adds optional per-message From identity overrides on email sends, mirroring the
TypeScript SDK:

- from_ (maps to wire `from`): bare From address override. Was raw-only; now
  also on template sends.
- from_name (wire `fromName`): new on both send() and send_raw() — From display
  name, rendered as "Name <address>".

Either can be set alone; both fall back to the connection's configured values.
Added to TemplateSend/RawSend dataclasses, the serializer, and the sync + async
clients, with tests and a README note.
@codecov

codecov Bot commented Jul 8, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@tuyakhov tuyakhov merged commit 838f0f1 into main Jul 8, 2026
9 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.

2 participants