Ultimail-Provider-Postmark
Provider middleware for Ultimail that adds support for sending emails via Postmark.
Quick Start
You need to configure this middleware as an Ultimail "provider" using the mailer.configure()
method:
const Ultimail = ;const ultimailProviderPostmark = ; const mailer = from: `some@email.com` styles: true; mailer;
Configuration
You can pass the following config options to this middleware:
Option | Default Value | Description |
---|---|---|
apiKey | The API server key that Postmark assigns to your server. | |
throwOnFailure | true |
Set false to just return the Postmark response when an email fails to send, instead of throwing an error. |
Response Object
The shape of the response object returned by Postmark can be found in the Postmark API documentation. If you want to get access to the response object even when an email fails to send (instead of an error being thrown), you will need to set the "throwOnFailure" config option to a falsy value.