# Corven Email SDK > Send transactional email with Effect. Configure provider Layers, validate messages and handle typed submission outcomes. Corven Email SDK (`@corven/email-sdk`) provides an Effect service for validating and sending email through configured provider accounts. It requires Node.js >=24.18.0 and Effect 4.0.3. Use the [quickstart](/quickstart) to install the package and record an email offline. Then [configure a provider](/sending). Append `.md` to a guide URL to retrieve Markdown. - Import `Email` from `@corven/email-sdk` and provider Layers from their public subpaths. - Supply credentials and transport in the application. Disable automatic redirects, transport-level send retries and sensitive request logging. - Store queue, scheduling and recovery state in the application. The SDK does not persist these records. - An accepted receipt confirms provider acknowledgment, not delivery. An unknown result means the SDK could not determine whether the provider accepted the request. - Retrying an unknown result requires provider-supported idempotency for the selected account, the same key and prepared request, an unexpired retention window and an eligible policy and error reason. - Fallback is allowed only after an eligible definite rejection. It stops after an unknown outcome or terminal result. - Agent sends require application approval of the prepared operation. Model confirmation and framework flags do not replace this check. ## Get started - [Corven Email SDK](https://email-sdk.corvencore.com/): Send transactional email from Effect programs with explicit providers, local validation and typed submission outcomes. - [Installation and runtime](https://email-sdk.corvencore.com/getting-started/installation): Install the local package, choose ESM or CommonJS loading and add optional rendering peers only when needed. - [Quickstart](https://email-sdk.corvencore.com/quickstart): Install the SDK and record your first email without credentials or network calls. - [Credentials and account configuration](https://email-sdk.corvencore.com/getting-started/credentials): Acquire secrets in your application and supply the exact credentials and attestations required by each provider. - [Send through a provider](https://email-sdk.corvencore.com/sending): Configure a Resend account and HTTP transport, then send from an Effect program. ## Providers - [Choose a provider](https://email-sdk.corvencore.com/providers): Configure an existing provider account, compare supported intent and distinguish ordinary email from native jobs. - [Message field support](https://email-sdk.corvencore.com/providers/field-support): Compare the SDK's declared provider profiles for headers, attachments, metadata, scheduling and tags. - [Capabilities and local preflight](https://email-sdk.corvencore.com/providers/capabilities): Inspect supported fields and validate complete provider intent without acquiring credentials or sending. - [Validation and verification boundaries](https://email-sdk.corvencore.com/providers/verification): Distinguish local validation, synthetic tests, installed consumers, account authentication and real delivery. - [Resend](https://email-sdk.corvencore.com/providers/resend): Send literal messages through Resend with native idempotency and scheduling. - [Postmark](https://email-sdk.corvencore.com/providers/postmark): Send through a Postmark message stream with repeated headers and metadata. - [SendGrid](https://email-sdk.corvencore.com/providers/sendgrid): Configure SendGrid regional Mail Send and opt-in native personalization. - [Mailgun](https://email-sdk.corvencore.com/providers/mailgun): Send multipart messages through a Mailgun sending domain and region. - [MailerSend](https://email-sdk.corvencore.com/providers/mailersend): Send with MailerSend scheduling, repeated headers and suppression-aware receipts. - [MailPace](https://email-sdk.corvencore.com/providers/mailpace): Configure MailPace with supported headers, attachment types and tags. - [Unosend](https://email-sdk.corvencore.com/providers/unosend): Send through Unosend with supported attachment MIME types and scheduling. - [Lettermint](https://email-sdk.corvencore.com/providers/lettermint): Send through a Lettermint route with native keys and sandbox-aware receipts. - [Plunk](https://email-sdk.corvencore.com/providers/plunk): Configure Plunk with explicit consent to contact upserts and provider-generated text. - [Helo](https://email-sdk.corvencore.com/providers/helo): Send through a Helo channel with explicit live or sandbox mode. - [JetEmail](https://email-sdk.corvencore.com/providers/jetemail): Configure JetEmail transactional credentials, domain settings and idempotency key forwarding. - [Lettr](https://email-sdk.corvencore.com/providers/lettr): Choose Lettr immediate or scheduled submission and preserve count-only outcomes. - [SparkPost](https://email-sdk.corvencore.com/providers/sparkpost): Configure SparkPost transmissions with count-aware acknowledgment and regional transport. - [Primitive](https://email-sdk.corvencore.com/providers/primitive): Configure Primitive key requirements without assuming its content deduplication is replay-safe. - [Mailtrap](https://email-sdk.corvencore.com/providers/mailtrap): Send through Mailtrap Email Sending while preserving all acknowledgment IDs. - [Mailchimp Transactional](https://email-sdk.corvencore.com/providers/mailchimp): Send through Mailchimp Transactional with explicit account behavior and recipient outcomes. - [Scaleway](https://email-sdk.corvencore.com/providers/scaleway): Configure a Scaleway project with constrained transactional message support. - [ZeptoMail](https://email-sdk.corvencore.com/providers/zeptomail): Choose a ZeptoMail live or sandbox agent and preserve its acknowledgment scope. - [Cloudflare Email Sending](https://email-sdk.corvencore.com/providers/cloudflare): Use Cloudflare Email Sending through the REST API with explicit account and mail-flow settings. - [Amazon SES](https://email-sdk.corvencore.com/providers/ses): Send through the SES v2 regional API with explicit signing credentials. - [Microsoft Graph](https://email-sdk.corvencore.com/providers/graph): Submit through a Microsoft Graph mailbox using a host-acquired access token. - [SMTP](https://email-sdk.corvencore.com/providers/smtp): Send MIME email over explicit TLS SMTP with protocol-level recipient outcomes. - [Brevo](https://email-sdk.corvencore.com/providers/brevo): Configure Brevo transactional messages, provider rendering and tracking. - [Sequenzy](https://email-sdk.corvencore.com/providers/sequenzy): Configure HTML sends with provider-managed profiles, rendering and retention. - [SendHeron](https://email-sdk.corvencore.com/providers/sendheron): Choose SendHeron attachment policy and its corresponding replay guarantees. ### Native jobs - [Loops transactional templates](https://email-sdk.corvencore.com/providers/loops): Configure a Loops account and send a job that uses a published transactional template. - [Iterable triggered campaigns](https://email-sdk.corvencore.com/providers/iterable): Configure an Iterable campaign, recipient identity, data retention and tracking permissions. ## Core concepts - [Services and Layers](https://email-sdk.corvencore.com/concepts/service-model): Understand how Email, EmailSender and provider Layers divide preparation, policy and transport. - [Messages and attachments](https://email-sdk.corvencore.com/messages): Define addresses, message bodies, attachments and schedules with validated TypeScript inputs. - [Choose a sending mode](https://email-sdk.corvencore.com/concepts/sending-modes): Select individual sends, batches, personalization, scheduled intent or native template jobs. - [Receipts, errors and retries](https://email-sdk.corvencore.com/reliability): Interpret submission outcomes and choose retry or fallback behavior without duplicating an email. - [Idempotency and retries](https://email-sdk.corvencore.com/concepts/idempotency): Check key support and provider requirements before retrying a request with an unknown outcome. - [Deadlines and cancellation](https://email-sdk.corvencore.com/concepts/cancellation): Bound logical operations while preserving uncertainty, interruption and resource ownership. - [Privacy and diagnostics](https://email-sdk.corvencore.com/concepts/privacy): Keep credentials and private message data out of diagnostics while selecting capture and telemetry deliberately. ## Composition - [Defaults, preparation and observations](https://email-sdk.corvencore.com/composition): Apply defaults and transformations, review prepared messages and configure observations or capture. - [Message defaults](https://email-sdk.corvencore.com/composition/defaults): Apply shared reply-to, header, tag, metadata and key-prefix settings before provider validation. - [Message transformations](https://email-sdk.corvencore.com/composition/transformations): Prepare trusted replacement content without changing operation keys, policy or approved intent. - [Submission observations](https://email-sdk.corvencore.com/composition/observations): Observe minimal starting and settled sender-call facts without capturing private payloads. - [Private submission capture](https://email-sdk.corvencore.com/composition/capture): Capture bounded private request/outcome payloads with explicit permission and retention controls. - [Prepared-operation observations](https://email-sdk.corvencore.com/composition/operations): Observe effective previews, private context and complete logical outcomes around an Email operation. - [Aggregate account observations and capture](https://email-sdk.corvencore.com/composition/aggregation): Query named existing views across routed accounts without confusing their units or creating a global history. - [Native job defaults](https://email-sdk.corvencore.com/composition/native-defaults): Apply Loops variables and Iterable data/metadata defaults without changing the native service contract. - [Native job observations and capture](https://email-sdk.corvencore.com/composition/native-instrumentation): Inspect Loops and Iterable operations through their own minimal or private instrumentation boundaries. ## Email UI - [Email UI and template recipes](https://email-sdk.corvencore.com/ui): Build transactional layouts from the SDK's themed React components and task-specific application recipes. - [React email components](https://email-sdk.corvencore.com/ui/components): Use the document, card, heading, paragraph, action and divider components returned by a theme factory. - [Theme email components](https://email-sdk.corvencore.com/ui/themes): Choose light or dark defaults and override explicit color, typography and radius values. ### Account - [Verification code](https://email-sdk.corvencore.com/ui/verification-code): Render an expiring verification code while keeping issuance and authorization in the host. - [Password reset](https://email-sdk.corvencore.com/ui/password-reset): Render a password-reset link with an explicit expiry and host-owned token lifecycle. - [Team invitation](https://email-sdk.corvencore.com/ui/team-invite): Render an invitation identifying the inviter and team without granting membership by email. ### Product - [Welcome](https://email-sdk.corvencore.com/ui/welcome): Render a welcome message with one useful next action for the new account. - [Trial ending](https://email-sdk.corvencore.com/ui/trial-ending): Show the trial deadline and a trusted link to plan settings. - [Usage alert](https://email-sdk.corvencore.com/ui/usage-alert): Show measured usage and its limit without changing quotas or subscription state. ### Billing - [Payment receipt](https://email-sdk.corvencore.com/ui/receipt): Render a payment reference and formatted amount from authoritative billing state. - [Invoice due](https://email-sdk.corvencore.com/ui/invoice-due): Render an invoice amount, due date and trusted review link. - [Refund confirmation](https://email-sdk.corvencore.com/ui/refund-confirmed): Report a recorded refund while distinguishing it from payment-method settlement. ## Integrations - [Integrations](https://email-sdk.corvencore.com/integrations): Connect React rendering, host-approved agents and provider-specific inbound reports to the core workflow. - [Render React email](https://email-sdk.corvencore.com/integrations/react): Render trusted React elements into validated HTML and text before provider submission. - [Approve agent-requested email](https://email-sdk.corvencore.com/integrations/agent): Let a model propose content while the host owns sender, account, keys, policy and approval. - [Add an AI email tool](https://email-sdk.corvencore.com/integrations/ai): Expose a Standard Schema tool backed by the scoped host-approved EmailAgent service. ### Webhooks - [Process webhook reports](https://email-sdk.corvencore.com/integrations/webhooks): Separate ingress authentication, event projection, tenant binding and durable replay handling. - [Resend webhooks](https://email-sdk.corvencore.com/integrations/webhooks/resend): Verify raw Resend webhook bytes and Svix headers before projecting supported event reports. - [Mailgun webhooks](https://email-sdk.corvencore.com/integrations/webhooks/mailgun): Verify Mailgun signature fields while retaining unverified event-body provenance. - [Postmark webhook reports](https://email-sdk.corvencore.com/integrations/webhooks/postmark): Parse unsigned Postmark delivery, complaint and bounce reports after application-level ingress checks. ## Guides - [Batching, personalization and routing](https://email-sdk.corvencore.com/batching-routing): Send ordered batches, personalize messages and configure fallback between named provider accounts. - [Personalize an email](https://email-sdk.corvencore.com/guides/personalization): Render recipient variables locally or deliberately choose a native grouped audience. - [Schedule an email](https://email-sdk.corvencore.com/guides/scheduling): Choose provider scheduling or an application-owned worker and preserve the intended UTC instant. - [Test email workflows](https://email-sdk.corvencore.com/guides/testing): Test recorded intent and controlled failures without contacting a provider. - [Build a production send pipeline](https://email-sdk.corvencore.com/guides/production-pipeline): Connect durable application state to local preparation, provider dispatch and outcome reconciliation. - [Troubleshoot a failed send](https://email-sdk.corvencore.com/guides/troubleshooting): Diagnose configuration, local validation, definite rejection and unknown outcomes without unsafe resends. - [Migrate an existing notification workflow](https://email-sdk.corvencore.com/guides/migration): Move provider-specific application code behind Email while preserving fields, failures and account identity. - [Compare providers for a workflow](https://email-sdk.corvencore.com/guides/provider-comparisons): Compare provider field support, idempotency and required account settings. - [Create an HTTP provider](https://email-sdk.corvencore.com/guides/authoring-provider): Define a typed account Layer, credential-free preflight and request/response hooks using the public provider builder. ## For agents - [Documentation for coding agents](https://email-sdk.corvencore.com/agents): Retrieve SDK documentation, use public imports and require application approval for sends. ## Reference - [API reference](https://email-sdk.corvencore.com/reference): Find the common service, message, options, receipt, sender, routing and offline CLI contracts. - [Email service reference](https://email-sdk.corvencore.com/reference/email): Exact common service methods, expected failures, prepared-operation members and routed result differences. - [Message reference](https://email-sdk.corvencore.com/reference/message): Message fields, input types and validation limits. - [Attachment reference](https://email-sdk.corvencore.com/reference/attachments): Construct canonical bounded attachments and preserve explicit MIME and inline-placement choices. - [Send options and delivery policy](https://email-sdk.corvencore.com/reference/options): Define keys, complete policy overrides, execution metadata and bounded batch concurrency. - [Receipt reference](https://email-sdk.corvencore.com/reference/receipts): Preserve exact receipt tags, correlation fields, recipient partitions and synthetic outcomes. - [Error reference](https://email-sdk.corvencore.com/reference/errors): Inspect expected SDK error tags and safe fields without treating uncertainty, defects or interruption as non-submission. - [Sender and provider contract](https://email-sdk.corvencore.com/reference/sender): Define provider capabilities, local validation and request and response handling. - [Routing reference](https://email-sdk.corvencore.com/reference/routing): Register named Email accounts, select a route plan and preserve actual route identity in receipts. - [Extension callbacks](https://email-sdk.corvencore.com/reference/callbacks): Acquire callback dependencies once and distinguish retry restrictions from observations and message preparation. - [Scope and compatibility](https://email-sdk.corvencore.com/reference/scope): Distinguish implemented SDK workflows from similarly named features in other email libraries or hosted products. ### CLI - [Offline CLI reference](https://email-sdk.corvencore.com/reference/cli): Inspect installed exports and validate JSON requests locally with corven-email. - [corven-email help](https://email-sdk.corvencore.com/reference/cli/help): Display supported offline commands and their safety boundaries. - [corven-email discover](https://email-sdk.corvencore.com/reference/cli/discover): List public entrypoints from the installed package manifest without discovering accounts. - [corven-email providers](https://email-sdk.corvencore.com/reference/cli/providers): List implemented credential-free local inspection profiles and their declared capabilities. - [corven-email schema](https://email-sdk.corvencore.com/reference/cli/schema): Export a partial JSON Schema document for local request tooling without replacing authoritative validation. - [corven-email validate](https://email-sdk.corvencore.com/reference/cli/validate): Validate one private UTF-8 JSON request from stdin, optionally using a supported provider profile. ## Agent resources - [llms-full.txt](https://email-sdk.corvencore.com/llms-full.txt): The full Markdown of every page in one file. - [Page Markdown](https://email-sdk.corvencore.com/index.md): Append `.md` to any page URL to fetch that page as raw Markdown. - [JSON API](https://email-sdk.corvencore.com/api/docs/pages.json): Page index of the JSON docs API; each entry links the page's JSON and Markdown forms. Described by the OpenAPI document at https://email-sdk.corvencore.com/openapi.json. - [API catalog](https://email-sdk.corvencore.com/.well-known/api-catalog): RFC 9727 linkset of the APIs documented here. - [agent-readability.json](https://email-sdk.corvencore.com/agent-readability.json): Manifest of every agent-facing artifact on this site. - [Sitemap](https://email-sdk.corvencore.com/sitemap.xml): Every indexable page URL with its last-modified date.