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

Postmark

Send through a Postmark message stream with repeated headers and metadata.

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

Configure the account

import { Layer } from "effect";
import type { Redacted } from "effect";
import { postmarkEmailLayer } from "@corven/email-sdk/postmark";
import { emailHttpLayer } from "./sending.js";

export const configuredPostmarkAccount = (serverToken: Redacted.Redacted) =>
  postmarkEmailLayer({ serverToken, messageStream: "outbound" }).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

  • Use a server submission token. The validation-only POSTMARK_API_TEST token is rejected at Layer acquisition.
  • The default message stream is outbound. Only one tag is supported; tag names cannot contain a colon.
  • Attachments require explicit MIME types. Scheduling is unsupported.

Idempotency

This integration declares no send idempotency support. Supplying an idempotency key fails locally; an unknown result cannot be replayed or moved to another account.

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.