MCPcopy
hub / github.com/simstudioai/sim / sendBatch

Function sendBatch

apps/sim/lib/messaging/email/providers/resend.ts:50–69  ·  view source on GitHub ↗
(emails: ProcessedEmailData[])

Source from the content-addressed store, hash-verified

48 }
49 },
50 async sendBatch(emails: ProcessedEmailData[]): Promise<BatchSendEmailResult> {
51 const payloads = emails.map(toResendPayload)
52 const response = await client.batch.send(payloads as never)
53 if (response.error) {
54 throw new Error(response.error.message || 'Resend batch API error')
55 }
56
57 const results: SendEmailResult[] = emails.map((_, index) => ({
58 success: true,
59 message: 'Email sent successfully via Resend batch',
60 data: { id: `batch-${index}` },
61 }))
62
63 return {
64 success: true,
65 message: 'All batch emails sent successfully via Resend',
66 results,
67 data: { count: emails.length },
68 }
69 },
70 }
71}

Callers

nothing calls this directly

Calls 1

sendMethod · 0.80

Tested by

no test coverage detected