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

[feat]: add batch method #2

Open
caseybaggz opened this issue Feb 16, 2024 · 1 comment
Open

[feat]: add batch method #2

caseybaggz opened this issue Feb 16, 2024 · 1 comment

Comments

@caseybaggz
Copy link

Such a clean and great API of the resend client. I am in need of the send.batch API but am just now learning Rust so I don't trust myself in making it. As soon as it's published I'll happily support this project though:

import { Resend } from 'resend';

const resend = new Resend('re_123456789');

await resend.batch.send([
  {
    from: 'Acme <[email protected]>',
    to: ['[email protected]'],
    subject: 'hello world',
    html: '<h1>it works!</h1>',
  },
  {
    from: 'Acme <[email protected]>',
    to: ['[email protected]'],
    subject: 'world hello',
    html: '<p>it works!</p>',
  },
]);
@BadMask121
Copy link

i think you can do the same using vectors then call .send for each vector value of email you want to send

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

No branches or pull requests

2 participants