Skip to content
Corven Email SDK
Esc
↑↓navigate↵open⌘Jpreview
On this page

Amazon SES

Send through the SES v2 regional API with explicit signing credentials.

Import sesEmailLayer from @corven/email-sdk/ses to provide the common Email service for this account.

Configure the account

import { Layer } from "effect";
import { sesEmailLayer } from "@corven/email-sdk/ses";
import type { SesEmailOptions } from "@corven/email-sdk/ses";
import { emailHttpLayer } from "./sending.js";

export const configuredSesAccount = (
  credentials: Pick<SesEmailOptions, "accessKeyId" | "secretAccessKey" | "sessionToken">,
) =>
  sesEmailLayer({ ...credentials, mailFlow: "ProviderUnmodified", region: "us-east-1" }).pipe(
    Layer.provide(emailHttpLayer),
  );

The example reuses the explicit HTTP Layer. Acquire credentials in trusted host code, then provide this account Layer to your sending program.

Message behavior

  • The SDK signs requests itself using supplied accessKeyId, secretAccessKey and optional sessionToken. It does not use an ambient AWS credential chain.
  • Supported regions are us-east-1, us-west-2 and eu-west-1. mailFlow attests that provider behavior preserves the message data.
  • Use explicit MIME types and supported attachment extensions. Common metadata and scheduling are unsupported; bounded ASCII tags are available.

Idempotency

Idempotency keys are not supported. The SDK does not retry requests with unknown submission outcomes.

Read field support before switching accounts, and receipts and retries before adding recovery behavior. Configuration and local validation do not authenticate the account or prove delivery.