resend / resend-node

Resend's Official Node.js SDK
MIT License
571 stars 42 forks source link

[v4] `replyTo` is not functioning when using `batch` #421

Open mwskwong opened 3 months ago

mwskwong commented 3 months ago

replyTo no longer functions after upgrading to v4 and renaming from reply_to. Issue not reproducible on v3.5, when reply_to is still being used.

My usage (simplified):

resend.batch.send([
  {
    from,
    to: email,
    replyTo: data.email,
    subject: data.subject
      ? `[${siteDisplayName}] ${data.subject}`
      : `You got a message from ${siteDisplayName}`,
    react: <ContactFormNotification {...data} />,
  },
  {
    from,
    to: data.email,
    subject: `Got Your Message From ${siteDisplayName}!`,
    react: <ContactFormAcknowledgement {...data} />,
  },
]);

https://github.com/mwskwong/mwskwong.com/blob/20469fb8c20266821fdf5d61db2e2994e3e04bac/src/lib/actions.tsx#L25

pinktonio commented 2 months ago

Using reply_to is working but it gives a type error.

hoomanaskari commented 1 month ago

in my case, after upgrading to v4 of resend npm package, reply_to is always set to the same email as to I had to downgrade back to v3.2.0 to make it work again