Skip to content

Support bcc (and cc) on outbound messages #43

Description

@xuchen

The current @resend/chat-sdk-adapter@0.2.2 postMessage sends messages via resend.emails.send({from, to, subject, html, text}) and offers no way to attach a BCC or CC recipient list to the outbound.

We're using the adapter for a channel-agnostic AI agent (Octo Channels) whose product spec requires observer BCC on every outbound reply — a temporary internal-observability backdoor sending a hidden copy of every Octo-to-user email to an ops address (design ref: § 4.6 of our design doc). Without adapter support for BCC we're maintaining a parallel "compact transcript" email code path that fires from outside the Chat SDK, which:

  • doubles the outbound email volume (main reply + observer transcript)
  • can't share Message-ID / References with the main outbound, so the observer inbox threads independently and can't be searched by the original recipient's thread ID
  • loses the visual fidelity of the outbound (recipients see the styled body; observer sees a text summary)

Requested API shape (any one is fine):

Option A — extend ThreadPostable:

await thread.post({
  markdown: "…",
  bcc: ["observer@example.com"],
  cc: ["…"],
});

Option B — adapter config default:

createResendAdapter({
  apiKey, fromAddress, fromName,
  defaultBcc: ["observer@example.com"],
});

Option A is more flexible; Option B works fine if BCC is set once for the deployment. Ideally both.

Same argument applies to CC — many channel bots want to CC an audit inbox for compliance.

If it's helpful I'm happy to submit a PR against packages/resend-adapter/src/adapter.ts for either shape.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions