Postmark
hono-email/postmark provides PostmarkAdapter for the Postmark Email API.
Example
Section titled “Example”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.
Shared adapter features
Section titled “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
Section titled “Options”serverToken Required
Section titled “serverToken ”Type: string
Your Postmark server token.
messageStream Optional
Section titled “messageStream ”Type: string · Default: 'outbound'
Postmark message stream ID.
tag Optional
Section titled “tag ”Type: string
Tag for grouping and filtering messages in the Postmark dashboard.
trackOpens Optional
Section titled “trackOpens ”Type: boolean
Enable open tracking.
trackLinks Optional
Section titled “trackLinks ”Type: 'HtmlAndText' | 'HtmlOnly' | 'TextOnly' | 'None'
Enable link click tracking.
apiBaseUrl Optional
Section titled “apiBaseUrl ”Type: string
Override the Postmark API base URL.
fetch Optional
Section titled “fetch ”Type: (input: string, init: RequestInit) => Promise<Response>
Custom fetch implementation. Defaults to globalThis.fetch.
userAgent Optional
Section titled “userAgent ”Type: string
limits.maxAttachmentSize Optional
Section titled “limits.maxAttachmentSize ”Type: number
Maximum attachment size in bytes.