How to send email with Postmark
How to send transactional email notifications to Postmark with Knock.
Knock integrates with Postmark to send email notifications to your users. This page describes how to get started with Postmark in Knock, including necessary provider configurations and additional data you can pass through to Postmark.
Features
#- Attachments support
- Delivery tracking
- Bounce Support
- Knock link and open tracking
- Postmark link and open tracking
- Per environment configuration
- Sandbox mode
Getting started
#You can create a new Postmark channel in the dashboard under the Channels and sources page in your account settings. From there, you'll need to configure the channel for each environment you have.
Channel configuration
#The following channel settings should be configured per environment. Navigate to Channels and sources in your dashboard account settings, select your Postmark channel, then click "Manage configuration" under the environment that you'd like to configure.
Additional data sent
#Knock sends the following attributes along with your emails:
Metadata.sender: always set toknock.appMetadata.knock_message_id: the ID of the message this email is associated withMetadata.knock_recipient_id: the Knock ID of the recipient this email is being sent toTag: the key of the workflow this message was generated from
You can learn about the role of these Postmark attributes in the Postmark API documentation.
Recipient data requirements
#In order to send an email notification you'll need a valid email property set on your recipient.
Delivery status webhooks
#When enabled, Postmark will send delivery status updates directly to Knock via webhooks, allowing you to track the full lifecycle of your email messages in real-time.
Prerequisites
#Before enabling delivery status webhooks, you need:
- A verified sender signature or domain in Postmark
- A Postmark channel configured in Knock (see the getting started section above)
- Access to your Postmark server webhook settings
Setting up delivery status webhooks
#Supported delivery statuses
#When delivery status webhooks are enabled for Postmark, Knock will update message statuses based on these Postmark webhook events:
Troubleshooting
#If delivery status updates aren't appearing in Knock:
- Check webhook configuration. Verify both the Delivery and Bounce webhooks are configured with the correct Knock webhook URL in your Postmark server settings.
- Verify sender signature. Ensure you're sending from a verified sender signature or domain in Postmark.
- Check Postmark activity. Review the Activity page in Postmark to ensure emails are being sent successfully.
Using overrides to customize notifications
#We provide full support for overriding the payload of your email notifications. This enables you to customize the API request that Knock sends to Postmark on your behalf.
Targeting a specific MessageStream
#Knock does not target a specific MessageStream when sending your transactional email notifications to Postmark. This means that Postmark defaults your notifications to the "outbound" transactional stream.
For marketing use cases such as newsletters or product updates sent to large recipient lists, and particularly when leveraging Knock's broadcasts feature, we recommend following Postmark's best practices for sending promotional messaging via a separate MessageStream.