AutoSend

Send transactional emails from Convex with built-in queueing, retries, webhook verification, and delivery tracking through AutoSend's API.

Installation

npm install @autosend/convex

About AutoSend

AutoSend provides a comprehensive email delivery system for Convex applications with queue-first sending, automatic retries, and delivery lifecycle tracking. It handles transactional emails through a robust component that includes webhook verification, idempotency controls, and template support. The component manages everything from initial email queuing to delivery status tracking through AutoSend's API.

Benefits

Use cases

how to send transactional emails from Convex mutations

The AutoSend component provides sendEmail() and sendBulk() functions that work directly in Convex mutations. Emails are automatically queued and processed with built-in retry logic for failed deliveries.

Convex email component with delivery tracking

AutoSend tracks email status through the full lifecycle (queued, sending, retrying, sent, failed, canceled) and stores webhook events. Use status() for single emails or statusBatch() for multiple emails to check delivery status.

how to handle email webhooks in Convex

The component includes handleCallback() for processing AutoSend webhooks with HMAC signature verification and duplicate prevention. Mount the webhook route in your HTTP router to automatically receive delivery events.

send bulk emails with templates in Convex

Use sendBulk() with recipientData to send personalized emails to up to 100 recipients. The component interpolates placeholders in subject and content per recipient and supports AutoSend template IDs with dynamic data.

Frequently asked questions

Does AutoSend component handle email delivery failures automatically?

Yes, the AutoSend component automatically retries failed emails with configurable backoff for retryable failures like network issues or 5xx responses. You can track retry attempts through the status API and webhook events.

Can I send emails with attachments using this component?

The AutoSend component supports both inline base64 content attachments and URL-referenced file attachments. You can specify filename, content type, and either base64 content or a file URL for each attachment.

How do I prevent duplicate emails with AutoSend component?

AutoSend component provides deterministic idempotency where duplicate sendEmail requests resolve to the same emailId. This prevents accidental duplicate sends even if your mutation runs multiple times.

What email tracking events does AutoSend component store?

The AutoSend component stores all webhook events including delivery confirmations, bounces, opens, and clicks. Use listEvents() to query webhook events per email with configurable limits up to 200 events.

Can I test emails without sending to real recipients?

Yes, AutoSend component supports sandbox mode with testMode and sandboxTo configuration. This rewrites all recipient addresses to your test emails while preserving the original email structure for testing.

Links