import { Resend } from 'resend'; const resend = new Resend('re_xxxxxxxxx'); await resend.batch.send([ { from: 'Acme <onboarding@resend.dev>', to: ['foo@gmail.com'], subject: 'hello world', html: '<h1>it works!</h1>', }, { from: 'Acme <onboarding@resend.dev>', to: ['bar@outlook.com'], subject: 'world hello', html: '<p>it works!</p>', }, ]);
{ "data": [ { "id": "ae2014de-c168-4c61-8267-70d2662a1ce1" }, { "id": "faccb7a5-8a28-4e9a-ac64-8da1cc3bc1cb" } ] }
Trigger up to 100 batch emails at once.
"Your Name <sender@domain.com>"
attachments
tags
scheduled_at
Was this page helpful?