Postmark
Looking for a way to send email notifications via Postmark? This step-by-step tutorial will show you how to integrate Postmark’s API the easy way.
Profile Requirements
To deliver a message to a recipient over Postmark, Courier must be provided the recipient’s email address. This value should be included in the recipient profile as email
.
Subject Character Limit
The Postmark API imposes a subject line limit of ~60 characters. Due to encoding, using emojis or special characters in the subject line will decrease this limit.
Override
You can use a provider override to replace what we send to Postmark’s Email API. For example, you can add MessageStream and an attachment to your request:
The message.providers.postmark.override
property can be used to replace what we send to Postmark’s Email API. Note: the override does not replace the entire object, only the elements that you define in the body of the override. You can see all the available options by visiting the Postmark API docs.
Using Postmark Templates
The message.providers.postmark.override.config
property can be used to override Courier templates and use Postmark’s Templates API.
Be sure to include the https://api.postmarkapp.com/email/withTemplate
URL in the config object along with the TemplateId
and TemplateModel
in the the body.
MAPPING A COURIER TEMPLATE TO YOUR POSTMARK TEMPLATE OVERRIDE
When using Postmark templates - make sure your request uses a template
parameter instead of content
. Otherwise the content
object will take presedence over the Postmark override. The template_id
must be valid or an error will occur.