Skip to content
Back

Messaging via Resend: "to": "\"undisclosed-recipients\": ;" in request body

  • 0
  • Messaging
  • Web
  • Cloud
well-made
21 Oct, 2025, 07:08

I'm using the node-appwrite@18.0.0 SDK.

TypeScript
await messaging.createEmail({
        messageId: ID.unique(),
        subject: "Subject",
        content: `htmlContent`,
        users: [recipientUserId],
        draft: false,
        html: true,
      });

I can see in the console that this is received and the correct user is picked along with their default email target, but Resend always rejects this with status 422:

TypeScript
{
    "name": "validation_error",
    "message": "Invalid `to` field. The email address needs to follow the `email@example.com` or `Name <email@example.com>` format.",
    "statusCode": 422
}

In the request body, the bcc field is showing the actual correct email address, whereas the "to" field is showing a weird escaped phrase:

TypeScript
{
    "bcc": ["(this is correct)"],
    "to": "\"undisclosed-recipients\": ;"
}
TL;DR
A user is experiencing issues with Resend not supporting 'undisclosed-recipients' in the request body and is unsure why. Another user points out that Resend is now an officially supported provider and the issue may be resolved.
Chirag Aggarwal
21 Oct, 2025, 10:48

<@1430088496009314354> which email adapter are you using?

Chirag Aggarwal
21 Oct, 2025, 10:48

oh Resend

Chirag Aggarwal
21 Oct, 2025, 10:48

maybe resend doesnt support undisclosed-recipients 🤔

Chirag Aggarwal
21 Oct, 2025, 11:02

<@1430088496009314354> issue might be on Resend's side as undisclosed-recipients is a special to field set when its empty and only bcc is filled - https://www.gmass.co/blog/undisclosed-recipients/

well-made
21 Oct, 2025, 11:07

Ah, possibly. But there was an article posted on the AppWrite blog announcing support of Resend via the SMTP adapter, and this was only a short while ago, so I'm not sure what the problem might be?

It doesn't look like there's any configuration to change the format of the request body in AppWrite (nor how it's interpreted in Resend).

well-made
4 Nov, 2025, 14:28

Just so everyone knows: Resend is now an officially supported provider in the messaging providers. I've not yet tested it, but it looks like the issue may be resolved.

Reply

Reply to this thread by joining our Discord

Reply on Discord

Need support?

Join our Discord

Get community support by joining our Discord server.

Join Discord

Get premium support

Join Appwrite Pro and get email support from our team.

Learn more