`hono-email/postmark` provides `PostmarkAdapter` for the Postmark Email API.

## Example

```tsx
import { Body, Html, Text, sendEmail } from 'hono-email'
import { PostmarkAdapter } from 'hono-email/postmark'

const receipt = await sendEmail({
  adapter: PostmarkAdapter({
    serverToken: process.env.POSTMARK_SERVER_TOKEN!,
    messageStream: 'outbound',
  }),
  from: 'sender@example.com',
  to: 'recipient@example.com',
  subject: 'Welcome',
  jsx: (
    <Html>
      <Body>
        <Text>Hello from Postmark.</Text>
      </Body>
    </Html>
  ),
})
```

For the full list of configuration options, see the [Postmark Options API Reference](/api/adapter-options/#postmark-options).

## Shared adapter features

Like all provider adapters, Postmark supports `to`, `cc`, `bcc`, `replyTo`, custom `headers`, and `attachments`. Inline attachments use `cid` when the provider supports content IDs.

## Options

import { Badge } from '@astrojs/starlight/components'

### `serverToken` <Badge text="Required" variant="caution" size="small" />

**Type:** `string`

Your Postmark server token.

### `messageStream` <Badge text="Optional" variant="note" size="small" />

**Type:** `string` · **Default:** `'outbound'`

Postmark message stream ID.

### `tag` <Badge text="Optional" variant="note" size="small" />

**Type:** `string`

Tag for grouping and filtering messages in the Postmark dashboard.

### `trackOpens` <Badge text="Optional" variant="note" size="small" />

**Type:** `boolean`

Enable open tracking.

### `trackLinks` <Badge text="Optional" variant="note" size="small" />

**Type:** `'HtmlAndText' | 'HtmlOnly' | 'TextOnly' | 'None'`

Enable link click tracking.

### `apiBaseUrl` <Badge text="Optional" variant="note" size="small" />

**Type:** `string`

Override the Postmark API base URL.

### `fetch` <Badge text="Optional" variant="note" size="small" />

**Type:** `(input: string, init: RequestInit) => Promise<Response>`

Custom `fetch` implementation. Defaults to `globalThis.fetch`.

### `userAgent` <Badge text="Optional" variant="note" size="small" />

**Type:** `string`

### `limits.maxAttachmentSize` <Badge text="Optional" variant="note" size="small" />

**Type:** `number`

Maximum attachment size in bytes.
