Resend email provider plugin for SimpleNS.
- 📧 Send HTML emails via Resend
- 🖼️ Automatic base64 image extraction to CID attachments
- 🔄 Template variable replacement (
{{var}},${var},{var},$var) - ⚡ Built-in rate limiting (configurable)
- ✅ Full TypeScript support
npm install @simplens/resendAdd to your simplens.config.yaml or generate using npx @simplens/config-gen gen @simplens/resend:
providers:
- package: '@simplens/resend'
id: email-resend
credentials:
RESEND_API_KEY: ${RESEND_API_KEY}
FROM_EMAIL: ${FROM_EMAIL}
options:
rateLimit:
maxTokens: 100 # Max emails in bucket
refillRate: 100 # Tokens refilled per interval
refillInterval: day # second | minute | hour | day| Credential | Description |
|---|---|
RESEND_API_KEY |
Your Resend API key (get one here) |
FROM_EMAIL |
Verified sender email address (verify domain) |
| Field | Type | Required | Description |
|---|---|---|---|
channel |
'email' |
✅ | Must be 'email' |
recipient.user_id |
string |
✅ | User identifier |
recipient.email |
string |
✅ | Valid email address |
content.subject |
string |
✅ | Email subject line |
content.html |
string |
✅ | HTML content (must contain at least one HTML tag) |
variables |
Record<string, unknown> |
❌ | Template variables |
Resend free tier allows 100 emails/day. Configure based on your plan:
| Plan | Suggested Config |
|---|---|
| Free | maxTokens: 100, refillRate: 100, refillInterval: day |
| Pro | maxTokens: 5000, refillRate: 5000, refillInterval: day |
# Install dependencies
npm install
# Build
npm run build
# Run tests
npm test
# Manual test (requires .env with RESEND_API_KEY, FROM_EMAIL, TO_EMAIL)
npm run test:sendMIT
SimpleNS Team