Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
mwskwong opened this issue Aug 17, 2024 · 3 comments · May be fixed by #428
Open

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

mwskwong opened this issue Aug 17, 2024 · 3 comments · May be fixed by #428

Comments

@mwskwong
Copy link

mwskwong commented Aug 17, 2024

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

@mwskwong mwskwong changed the title [v4] replyTo does nothing [v4] replyTo is not functioining Aug 17, 2024
@mwskwong mwskwong changed the title [v4] replyTo is not functioining [v4] replyTo is not functioning when using batch() Aug 17, 2024
@mwskwong mwskwong changed the title [v4] replyTo is not functioning when using batch() [v4] replyTo is not functioning when using batch Aug 17, 2024
@pinktonio
Copy link

Using reply_to is working but it gives a type error.

@hoomanaskari
Copy link

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

@zapaiamarce
Copy link

I'm using this solution in the meantime

c.forEach((c) => c.replyTo && ((c as any).reply_to = c.replyTo));
await resend.batch.send(c);

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 a pull request may close this issue.

4 participants