> AI agents: this is one page from PostHog's docs. Full index of Markdown docs for LLMs: https://posthog.com/llms.txt # Move from Postmark Canonical URL: https://posthog.com/docs/workflows/migrate/postmark > **Cloud region:** This page uses US Cloud hosts. For an EU Cloud project, use `https://eu.i.posthog.com` instead of `https://us.i.posthog.com` (ingestion host), and use `https://eu.posthog.com` instead of `https://app.posthog.com` (app host for links). ## On this page - [What moves](#what-moves) - [Run the import](#run-the-import) - [Switch your sending](#switch-your-sending) PostHog imports your Postmark suppressions, message streams, and templates in one background import. Or let your agent do it. Connect the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md): ### Install the PostHog MCP ``` npx @posthog/wizard mcp add ``` [](https://claude.ai/directory/connectors/posthog)[](https://chatgpt.com/plugins/plugin_asdk_app_699caef2d680819188727b0ddbb349dd)[](https://posthog.com/docs/model-context-protocol/cursor.md)[](https://posthog.com/docs/model-context-protocol/vscode.md)[](https://posthog.com/docs/model-context-protocol/codex.md) Then ask: Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[migrating-from-email-providers](https://posthog.com/docs/workflows/skills.md) “Move our email from Postmark to PostHog.” Copy ## What moves | From Postmark | In PostHog | | --- | --- | | Hard bounces | [Suppression list](https://posthog.com/docs/workflows/email/suppression.md). Blocks all email. | | Spam complaints and manual suppressions | Suppression list. Blocks marketing email. | | Unsubscribes | Opted out of all marketing email | | Custom broadcast streams | Marketing [categories](https://posthog.com/docs/workflows/email/opt-outs.md) | | Templates, with their layout | Templates, keyed by their Postmark alias. Pick a sender for each, because Postmark templates don't name one. | | Servers, streams, domains, senders, and webhooks | A list, so you know what to set up | Postmark has no automations or contact lists. Inbound streams, SMTP settings, send history, stats, and tokens stay in Postmark. ## Run the import 1. Copy a token from [Postmark](https://account.postmarkapp.com/api_tokens). A **server token** imports one server. The **account token** imports every live server, and lists your domains and senders. PostHog only reads, and deletes the token when the import ends. 2. Go to [**Messaging** > **Opt-outs**](https://app.posthog.com/workflows/opt-outs) and click **Import from another tool**. 3. Pick **Postmark**, paste the token, pick what to import, and click **Start import**. ![The Postmark import, with the token field and the list of steps](https://res.cloudinary.com/dmukukwp6/image/upload/w_1600,c_limit,q_auto,f_auto/postmark_import_light_0b20e3fd12.png) ## Switch your sending ### 1\. Set up your domain [Set up your domain](https://posthog.com/docs/workflows/domain.md) in PostHog, and publish its DNS records. PostHog needs its own records, even for a domain that already sends through Postmark. Keep Postmark's records until nothing sends through it. ### 2\. Move your transactional email Change your code one email at a time, starting with a low-risk one. You need a [project secret API key](https://posthog.com/docs/workflows/transactional/send-from-code.md#create-an-api-key). These examples use Node.js. Each [SDK page](https://posthog.com/docs/workflows/installation/quick-start.md#install-an-sdk) has the same send in its language. If your code writes the HTML, send it as it is. Name the email with a `templateKey`, so PostHog groups its metrics and logs. Before, with Postmark: ```javascript import { ServerClient } from "postmark" const client = new ServerClient(process.env.POSTMARK_SERVER_TOKEN) await client.sendEmail({ From: "Hedgebox ", To: "jane@example.com", Subject: "Reset your password", HtmlBody: html, MessageStream: "outbound", }) ``` After, with PostHog: ```javascript import { PostHog } from "posthog-node" const posthog = new PostHog("", { host: "https://us.i.posthog.com", secretKey: process.env.POSTHOG_PROJECT_SECRET_API_KEY, }) const { error } = await posthog.emails.send({ from: "Hedgebox ", to: "jane@example.com", templateKey: "password-reset", subject: "Reset your password", html, distinctId: userId, }) ``` If you send a Postmark template, the import copied it into PostHog. The import doesn't make it transactional, because it can't tell which templates your app sends, and a transactional email skips opt-outs and the frequency cap. Open it in the [email library](https://posthog.com/docs/workflows/email/library.md), [make it transactional](https://posthog.com/docs/workflows/transactional/templates.md#use-an-existing-template), and copy its template ID from its **API** tab. The template keeps its Postmark alias as its name, and the values that you sent in `TemplateModel` become its variables. Before, with Postmark: ```javascript await client.sendEmailWithTemplate({ From: "Hedgebox ", To: "jane@example.com", TemplateAlias: "welcome", TemplateModel: { name: "Jane", plan: "Pro" }, }) ``` After, with PostHog: ```javascript const { error } = await posthog.emails.send({ to: "jane@example.com", templateId: "", templateData: { name: "Jane", plan: "Pro" }, distinctId: userId, }) ``` A send to an address on the [suppression list](https://posthog.com/docs/workflows/email/suppression.md) fails with `recipient_suppressed`. Don't retry it. ### Watch for - **Transactional stream:** its mail becomes [transactional email](https://posthog.com/docs/workflows/transactional.md) in PostHog, which only a hard bounce blocks. Postmark also blocks spam complaints and manual entries on this stream, so those addresses now get transactional email. - **SMTP:** PostHog has no SMTP service. Change an app that sends over SMTP to the [server SDK](https://posthog.com/docs/workflows/installation/quick-start.md) or the [API](https://posthog.com/docs/workflows/installation/api.md). - **Inbound:** PostHog can't receive email, so inbound stays in Postmark. - **Images:** the import keeps each image's address. An image that Postmark hosts stops loading once you close your Postmark account, so copy it into PostHog first. Ask your agentwith the [PostHog MCP](https://posthog.com/docs/workflows/mcp.md)[migrating-from-email-providers](https://posthog.com/docs/workflows/skills.md) “Copy the images that Postmark hosts in our imported templates into PostHog, and point the templates at the copies.” Copy See [switch over safely](https://posthog.com/docs/workflows/migrate.md#switch-over-safely) for the full checklist.