caelum0x d46e7e8a19 feat(receiving): forward received emails, reusing original attachments
Adds the forward action for inbound mail across all three surfaces, picking
up the top-ranked item left in PLAN-2026-10-23-DEEP.md after round 2's
reply work:

- forwardReceivedEmail() (received-email-service.ts): builds a
  Gmail-style "Forwarded message" header block + optional comment,
  prepended to the original text/html, and reuses the original
  attachments by reading their bytes straight from inbound storage
  (new getStorageObjectBytes() in inbound-storage-service.ts) instead of
  re-uploading them, before handing off to the existing sendEmail
  pipeline (same quota/screening/suppression checks as send/reply).
- POST /emails/received/:id/forward on the Resend-compat public API and
  receivedEmail.forward on the dashboard tRPC router, both thin wrappers
  over the same service so behavior is identical everywhere.
- MCP tool forward_received_email, completing the reply/forward loop for
  AI-agent callers.
- Dashboard ForwardComposer UI (recipient input + optional note),
  toggled by a header-bar Forward icon next to Reply.

Verified via typecheck, eslint (0 errors), targeted vitest (both existing
suites still pass unmodified), and `pnpm build` for packages/mcp-server.
No migration, no new test files, per standing rules.
2026-10-24 00:44:23 +03:00
..
2025-09-03 08:21:55 +10:00