Resend Integration
Send transactional emails, campaign broadcasts, and notification messages through Resend's email delivery infrastructure.
Overview
PROIGN uses Resend for all outbound email delivery across modules:
- Campaign Module — Bulk email broadcasts, drip sequences, and newsletter delivery
- Support Module — Ticket confirmation emails, status updates, and agent notifications
- Fulfillment Module — Shipping confirmation and tracking number emails
- Platform — Account verification, password reset, and invitation emails
Prerequisites
- Resend account with API key
- Verified sending domain in Resend dashboard
- PROIGN tenant with at least one email-capable module enabled
- Admin or owner role in PROIGN
Setup
1. Verify Your Domain
- Log in to Resend and go to Domains
- Add your sending domain (e.g.,
notifications.yourdomain.com) - Add the DNS records (SPF, DKIM, DMARC) to your DNS provider
- Wait for verification (usually under 5 minutes)
2. Generate API Key
- Go to Resend → API Keys
- Create a new key with
Sending accesspermission - Restrict to your verified domain for security
- Copy the key — it is shown only once
3. Configure in PROIGN
The Resend API key is configured as a Cloudflare Worker secret at the platform level. Each module references it via service bindings — no per-tenant configuration is needed.
Email Types
| Type | Module | Trigger |
|---|---|---|
| Campaign broadcast | Campaign | Scheduled or manual send |
| Ticket confirmation | Support | New ticket created |
| Shipping notification | Fulfillment | Order shipped with tracking |
| Password reset | Platform | User requests reset |
| Invitation | Platform | Admin invites new user |
Sending Emails
All email sending goes through the email-worker queue consumer. Modules dispatch email jobs to the queue, and the worker sends them through Resend:
// Email job dispatched to Cloudflare Queue
{
"type": "send_email",
"payload": {
"to": "customer@example.com",
"from": "support@notifications.proign.com",
"subject": "Your ticket #1042 has been updated",
"html": "<h1>Ticket Updated</h1><p>Status changed to In Progress...</p>",
"replyTo": "support@tenant.com",
"tags": [
{ "name": "module", "value": "support" },
{ "name": "tenant", "value": "acme-corp" }
]
}
}
// Resend API response
{
"id": "re_abc123",
"from": "support@notifications.proign.com",
"to": ["customer@example.com"],
"created_at": "2026-02-21T10:30:00Z"
}Delivery & Tracking
Resend provides delivery tracking that PROIGN surfaces in the Campaign module:
| Event | Description | Surfaced In |
|---|---|---|
delivered | Email accepted by recipient's mail server | Campaign analytics |
opened | Recipient opened the email | Campaign analytics |
clicked | Recipient clicked a link | Campaign analytics |
bounced | Email could not be delivered (hard or soft bounce) | Campaign + Support |
complained | Recipient marked as spam | Campaign (auto-unsubscribe) |
Bounce and complaint events automatically update contact status in the Campaign module — hard-bounced addresses are suppressed, and spam complaints trigger auto-unsubscribe to protect sender reputation.
DNS Configuration
Resend requires DNS records for email authentication. After adding your domain in Resend, add these records to your DNS provider:
| Record | Type | Purpose |
|---|---|---|
| SPF | TXT | Authorizes Resend to send on your behalf |
| DKIM | CNAME (×3) | Cryptographic signature proving email authenticity |
| DMARC | TXT | Policy for handling emails that fail SPF/DKIM checks |
All three records are required for reliable delivery. Missing DKIM or DMARC records will cause emails to land in spam or be rejected entirely.
Queue Architecture
All emails flow through Cloudflare Queues for reliability and rate control:
- Transactional priority — Ticket replies, shipping confirmations, and password resets are processed immediately
- Campaign batching — Bulk sends are throttled to stay within Resend rate limits (varies by plan)
- Automatic retry — Failed sends are retried with exponential backoff (3 attempts over 15 minutes)
- Dead letter queue — Permanently failed emails are logged for review in the Campaign module
Troubleshooting
Emails Not Sending
- Verify your domain is confirmed in Resend
- Check the API key has sending permissions
- Review the email-worker queue logs for errors
High Bounce Rate
- Clean your contact lists in the Campaign module
- Ensure SPF, DKIM, and DMARC records are correctly configured
- Avoid sending to purchased or unverified email lists