(data: ProcessedEmailData)
| 36 | return { |
| 37 | name: 'resend', |
| 38 | async send(data: ProcessedEmailData): Promise<SendEmailResult> { |
| 39 | const payload = toResendPayload(data) |
| 40 | const { data: responseData, error } = await client.emails.send(payload as never) |
| 41 | if (error) { |
| 42 | throw new Error(error.message || 'Failed to send email via Resend') |
| 43 | } |
| 44 | return { |
| 45 | success: true, |
| 46 | message: 'Email sent successfully via Resend', |
| 47 | data: responseData, |
| 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) |
nothing calls this directly
no test coverage detected