Type Definitions
-
ClientDefaults
-
The defaults used for the construction of new clients. You can pass options in client constructors to override these options.
Properties:
Name Type Argument Default Description requestHoststring <optional>
api.postmarkapp.com The host name for whichever server we should use to access the Postmark API.
sslboolean <optional>
true Should ssl be used for accessing the API (http/https)?
requestFactoryfunction <optional>
Given the set of options, produce a new function that will be responsible for creating and processing HTTP requests.
-
PostmarkCallback(error, response)
-
Standard Postmark Callback
Parameters:
Name Type Description errorPostmarkError An error message and status code if the request fails due to invalid data.
errorwill benullif the API request was successful.responseobject The parsed JSON object that is sent as the result of the requested operation.
-
PostmarkError
-
Postmark Error
Properties:
Name Type Description statusnumber The HTTP status code returned from the API.
messagestring The error message returned from the API.
codenumber The API status code returned. Note, this is NOT the HTTP status code.
-
PostmarkMessage
-
Postmark Message
Properties:
Name Type Argument Description Tostring A comma-separate list of recipients.
Fromstring The email address of the sender, must be a registered and confirmed Sender Signature.
Ccstring <optional>
A comma-separated list of 'Cc' recipients.
Bccstring <optional>
A comma-separated list of 'Bcc' recipients.
ReplyTostring <optional>
The email address that should be used in the reply. Defaults to the 'From' address.
Tagstring <optional>
Tag to apply to this message when it is sent.
Subjectstring <optional>
The subject to be used in the message being sent.
HtmlBodystring <optional>
The HTML part of the email being sent. Optional when TextBody is specified.
TextBodystring <optional>
The text part of the email being sent. Optional when HTMLBody is specified.
TrackOpensboolean <optional>
Should a tracking image be included on HTML emails to track statistics?
TrackLinksstring <optional>
Should a link tracking be enabled for this message? (Possible values: 'HtmlOnly', 'TextOnly', 'HtmlAndText', 'None', and null)
HeadersArray.<PostmarkMessageHeader> The headers to apply when sending this message.
AttachmentsArray.<PostmarkAttachment> Any attachments that should be included when sending the email.
-
PostmarkMessageHeader
-
Postmark Message Header
Properties:
Name Type Description Namestring The name of the MIME Header.
Valuestring The content of the MIME Header.
-
PostmarkTemplateMessage
-
Postmark Template Message
Properties:
Name Type Argument Description TemplateIdnumber The templateId to use when sending this message.
Tostring A comma-separate list of recipients.
Fromstring The email address of the sender, must be a registered and confirmed Sender Signature.
TemplateModelobject The model that will be applied to the Template when the email is sent.
InlineCssboolean <optional>
Should CSS on the HTMLBody be inlined? (Defaults to true)
Ccstring <optional>
A comma-separated list of 'Cc' recipients.
Bccstring <optional>
A comma-separated list of 'Bcc' recipients.
ReplyTostring <optional>
The email address that should be used in the reply. Defaults to the 'From' address.
Tagstring <optional>
The tag to apply to this message when it is sent.
TrackOpensboolean <optional>
Should a tracking image be included on HTML emails to track statistics?
TrackLinksstring <optional>
Should a link tracking be enabled for this message? (Possible values: 'HtmlOnly', 'TextOnly', 'HtmlAndText', 'None', and null)
HeadersArray.<PostmarkMessageHeader> <optional>
The headers to apply when sending this message.
AttachmentsArray.<PostmarkAttachment> <optional>
Any attachments that should be included when sending the email.
Postmark.js