-
Notifications
You must be signed in to change notification settings - Fork 33
Migrating from older version
There has been a lot of improvements in version 2 of the library which we migrated to Typescript. However migration to it should be pretty easy.
All you would need to do is migrate clients if you would like to. In the latest version of the library, we also provide backward compatibility.
Version 1.x clients initialization
let postmark = require("postmark");
let serverToken = "xxxxxx-xxxxxx-xxxxx-xxxxxx";
let accountToken = "yyyyyy-yyyyy-yyyyy-yyyyyy"
let client = new postmark.Client(serverToken);
let accountClient = new postmark.AdminClient(accountToken);
Version 2.x clients initialization
let postmark = require("postmark");
let serverToken = "xxxxxx-xxxxxx-xxxxx-xxxxxx";
let accountToken = "yyyyyy-yyyyy-yyyyy-yyyyyy"
let client = new postmark.ServerClient(serverToken);
let accountClient = new postmark.AccountClient(accountToken);
From then on, you should be good to go. Most of the things will work pretty much the same. For additional details about each method, you can check out code examples at wiki and the detailed typescript documentation which will guide you even further.
Version 3 upgrade
There are significant core library changes in version 3 but no breaking changes compared to version 2.
Version 4 upgrade
There are no breaking code changes here, but we dropped support for old Node versions.
For additional information about the capabilities of the Postmark API, see Postmark Developers Documentation.
- Overview
- Migration from older version
- Getting started
- Email sending
- Bounces
- Templates
- Templates Push
- Server
- Servers
- Message Streams
- Webhooks
- Messages
- Domains
- Sender Signatures
- Stats
- Trigger Inbound Rules
- Suppressions
- Data Removal
- Embedding images in emails
- Error Handling
- Handling Web Hooks
- Mocking requests
- Troubleshooting
- Known issues and how to resolve them