Email delivery patterns including single, batch, scheduled emails and attachment handling. Use when building transactional email systems, batch communication workflows, scheduled delivery, or implementing file/URL attachments with reply-to and CC/BCC functionality.
View on GitHubFebruary 1, 2026
Select agents to install to:
npx add-skill https://github.com/vanman2024/ai-dev-marketplace/blob/main/plugins/resend/skills/email-delivery/SKILL.md -a claude-code --skill email-deliveryInstallation paths:
.claude/skills/email-delivery/# Email Delivery Skill
Comprehensive patterns and templates for implementing robust email delivery with Resend, covering single emails, batch operations, scheduled delivery, and attachment handling.
## Use When
- Building transactional email systems (confirmations, notifications, alerts)
- Implementing batch email campaigns (up to 100 recipients per request)
- Setting up scheduled/delayed email delivery
- Handling file attachments, buffers, or URL-based attachments
- Adding reply-to, CC, and BCC functionality
- Creating email templates with variables and dynamic content
- Implementing retry logic and delivery error handling
## Core Patterns
### 1. Single Email Sending
**Transactional emails** for immediate delivery with minimal latency:
```typescript
import { Resend } from 'resend';
const resend = new Resend('your_resend_key_here');
async function sendTransactionalEmail() {
const { data, error } = await resend.emails.send({
from: 'notifications@example.com',
to: 'user@example.com',
subject: 'Welcome to Example',
html: '<h1>Welcome!</h1><p>Thank you for signing up.</p>',
});
if (error) {
console.error('Failed to send email:', error);
return null;
}
return data;
}
```
### 2. Batch Email Sending
**Bulk operations** for sending up to 100 emails in a single request:
```typescript
async function sendBatchEmails(recipients: Array<{email: string; name: string}>) {
const emails = recipients.map(recipient => ({
from: 'newsletter@example.com',
to: recipient.email,
subject: `Hello ${recipient.name}!`,
html: `<p>Welcome ${recipient.name}</p>`,
}));
const { data, error } = await resend.batch.send(emails);
if (error) {
console.error('Batch send failed:', error);
return null;
}
return data;
}
```
### 3. Scheduled Email Delivery
**Time-based delivery** for emails sent at specific times:
```typescript
async function scheduleEmail(scheduledAt: Date) {
const { data, error } = await resend.emails