PHP Класс Postmark\PostmarkClient

Наследование: extends PostmarkClientBase
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
__construct ( string $serverToken, integer $timeout = 30 ) Create a new PostmarkClient.
activateBounce ( integer $id ) : Postmark\Models\DynamicResponseModel Cause the email address associated with a Bounce to be reactivated.
bypassInboundMessageRules ( integer $id ) : Postmark\Models\DynamicResponseModel Allow an inbound message to be processed, even though the filtering rules would normally prevent it from being processed.
createInboundRuleTrigger ( string $rule ) : Postmark\Models\DynamicResponseModel Create an Inbound Rule to block messages from a single email address, or an entire domain.
createTagTrigger ( string $matchName, boolean $trackOpens = true ) : Postmark\Models\DynamicResponseModel Create a Tag Trigger.
createTemplate ( string $name, string $subject, string $htmlBody, string $textBody ) : Postmark\Models\DynamicResponseModel Create a template
deleteInboundRuleTrigger ( integer $id ) : Postmark\Models\DynamicResponseModel Delete an Inbound Rule Trigger.
deleteTagTrigger ( integer $id ) : Postmark\Models\DynamicResponseModel Delete a Tag Trigger with the given ID.
deleteTemplate ( integer $id ) : Postmark\Models\DynamicResponseModel Delete a template.
editServer ( string $name = NULL, string $color = NULL, boolean $rawEmailEnabled = NULL, boolean $smtpApiActivated = NULL, string $inboundHookUrl = NULL, string $bounceHookUrl = NULL, string $openHookUrl = NULL, boolean $postFirstOpenOnly = NULL, boolean $trackOpens = NULL, string $inboundDomain = NULL, integer $inboundSpamThreshold = NULL ) : Postmark\Models\DynamicResponseModel Modify the associated Server. Any parameters passed with NULL will be ignored (their existing values will not be modified).
editTagTrigger ( integer $id, string $matchName, boolean $trackOpens = true ) : Postmark\Models\DynamicResponseModel Edit an existing Tag Trigger
editTemplate ( integer $id, string $name = NULL, string $subject = NULL, string $htmlBody = NULL, string $textBody = NULL ) : Postmark\Models\DynamicResponseModel Edit a template
getBounce ( integer $id ) : Postmark\Models\DynamicResponseModel Locate information on a specific email bounce.
getBounceDump ( integer $id ) : string Get a "dump" for a specific bounce.
getBounceTags ( ) : array Get the list of tags associated with messages that have bounced.
getBounces ( integer $count = 100, integer $offset, string $type = NULL, boolean $inactive = NULL, string $emailFilter = NULL, string $tag = NULL, string $messageID = NULL ) Get a batch of bounces to be processed.
getDeliveryStatistics ( ) : Postmark\Models\DynamicResponseModel Get an overview of the delivery statistics for all email that has been sent through this Server.
getInboundMessageDetails ( integer $id ) : Postmark\Models\DynamicResponseModel Get details for a specific inbound message.
getInboundMessages ( integer $count = 100, integer $offset, string $recipient = NULL, string $fromEmail = NULL, string $tag = NULL, string $subject = NULL, string $mailboxHash = NULL, string $status = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get messages sent to the inbound email address associated with this Server.
getOpenStatistics ( integer $count = 100, integer $offset, string $recipient = NULL, string $tag = NULL, string $clientName = NULL, string $clientCompany = NULL, string $clientFamily = NULL, string $osName = NULL, string $osFamily = NULL, string $osCompany = NULL, string $platform = NULL, string $country = NULL, string $region = NULL, string $city = NULL ) : Postmark\Models\DynamicResponseModel Get statistics for tracked messages, optionally filtering by various open event properties.
getOpenStatisticsForMessage ( integer $id, integer $count = 100, integer $offset ) : Postmark\Models\DynamicResponseModel Get information about individual opens for a sent message.
getOutboundBounceStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get bounce statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundClickBrowserFamilyStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get information about which browsers were used to open tracked links for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundClickBrowserPlatformStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get information about which browsers platforms (Desktop, Mobile, etc.) were used to open tracked links for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundClickLocationStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get information about part of the message (HTML or Text) tracked links were clicked from in messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundClickStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get click statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundEmailClientStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get email client statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundMessageDetails ( integer $id ) : Postmark\Models\DynamicResponseModel Get information related to a specific sent message.
getOutboundMessageDump ( integer $id ) : Postmark\Models\DynamicResponseModel Get the raw content for a message that was sent.
getOutboundMessages ( integer $count = 100, integer $offset, string $recipient = NULL, string $fromEmail = NULL, string $tag = NULL, string $subject = NULL, string $status = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Search messages that have been sent using this Server.
getOutboundOpenStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get open statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundOverviewStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get an overview of the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundPlatformStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get platform statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundReadTimeStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get reading times for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundSendStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get send statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundSpamComplaintStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get SPAM complaint statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getOutboundTrackedStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel Get bounce statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
getServer ( ) : Postmark\Models\DynamicResponseModel Get the settings for the server associated with this PostmarkClient instance (defined by the $server_token you passed when instantiating this client)
getTagTrigger ( integer $id ) : Postmark\Models\DynamicResponseModel Retrieve information related to the associated Tag Trigger
getTemplate ( integer $id ) : Postmark\Models\DynamicResponseModel Get the current information for a specific template.
listInboundRuleTriggers ( integer $count = 100, integer $offset ) : Postmark\Models\DynamicResponseModel Get a list of all existing Inbound Rule Triggers.
listTemplates ( integer $count = 100, integer $offset ) : Postmark\Models\DynamicResponseModel Get all templates associated with the Server.
retryInboundMessageHook ( integer $id ) : Postmark\Models\DynamicResponseModel Request that Postmark retry POSTing the specified message to the Server's Inbound Hook.
searchTagTriggers ( integer $count = 100, integer $offset, string $matchName = NULL ) : Postmark\Models\DynamicResponseModel Locate Tag Triggers matching the filter criteria.
sendEmail ( string $from, string $to, string $subject, string $htmlBody = NULL, string $textBody = NULL, string $tag = NULL, boolean $trackOpens = true, string $replyTo = NULL, string $cc = NULL, string $bcc = NULL, array $headers = NULL, array $attachments = NULL, string $trackLinks = NULL ) : Postmark\Models\DynamicResponseModel Send an email.
sendEmailBatch ( array $emailBatch = [] ) : Postmark\Models\DynamicResponseModel Send multiple emails as a batch
sendEmailWithTemplate ( string $from, string $to, integer $templateId, object $templateModel, boolean $inlineCss = true, string $tag = NULL, boolean $trackOpens = true, string $replyTo = NULL, string $cc = NULL, string $bcc = NULL, array $headers = NULL, array $attachments = NULL, string $trackLinks = NULL ) : Postmark\Models\DynamicResponseModel Send an email using a template.
validateTemplate ( string $subject = NULL, string $htmlBody = NULL, string $textBody = NULL, object $testRenderModel = NULL, boolean $inlineCssForHtmlTestRender = true ) : Postmark\Models\DynamicResponseModel Confirm that your template content can be parsed/rendered, get a test rendering of your template, and a suggested model to use with your templates.

Приватные методы

Метод Описание
fixHeaders ( $headers ) The Postmark API wants an Array of Key-Value pairs, not a dictionary object, therefore, we need to wrap the elements in an array.

Описание методов

__construct() публичный метод

Create a new PostmarkClient.
public __construct ( string $serverToken, integer $timeout = 30 )
$serverToken string The token associated with "Server" you'd like to use to send/receive email from.
$timeout integer The timeout, in seconds to wait for an API call to complete before throwing an Exception.

activateBounce() публичный метод

Cause the email address associated with a Bounce to be reactivated.
public activateBounce ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The bounce which has a deactivated email address.
Результат Postmark\Models\DynamicResponseModel

bypassInboundMessageRules() публичный метод

Allow an inbound message to be processed, even though the filtering rules would normally prevent it from being processed.
public bypassInboundMessageRules ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID for a message that we wish to unblock.
Результат Postmark\Models\DynamicResponseModel

createInboundRuleTrigger() публичный метод

Create an Inbound Rule to block messages from a single email address, or an entire domain.
public createInboundRuleTrigger ( string $rule ) : Postmark\Models\DynamicResponseModel
$rule string The email address (or domain) that will be blocked.
Результат Postmark\Models\DynamicResponseModel

createTagTrigger() публичный метод

Create a Tag Trigger.
public createTagTrigger ( string $matchName, boolean $trackOpens = true ) : Postmark\Models\DynamicResponseModel
$matchName string Name of the tag that will activate this trigger.
$trackOpens boolean Indicates if this trigger activates open tracking.
Результат Postmark\Models\DynamicResponseModel

createTemplate() публичный метод

Create a template
public createTemplate ( string $name, string $subject, string $htmlBody, string $textBody ) : Postmark\Models\DynamicResponseModel
$name string The friendly name for this template.
$subject string The template to be used for the 'subject' of emails sent using this template.
$htmlBody string The template to be used for the 'htmlBody' of emails sent using this template, optional if 'textBody' is not NULL.
$textBody string The template to be used for the 'textBody' of emails sent using this template, optional if 'htmlBody' is not NULL.
Результат Postmark\Models\DynamicResponseModel

deleteInboundRuleTrigger() публичный метод

Delete an Inbound Rule Trigger.
public deleteInboundRuleTrigger ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the rule trigger we wish to delete.
Результат Postmark\Models\DynamicResponseModel

deleteTagTrigger() публичный метод

Delete a Tag Trigger with the given ID.
public deleteTagTrigger ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the Tag Trigger we wish to delete.
Результат Postmark\Models\DynamicResponseModel

deleteTemplate() публичный метод

Delete a template.
public deleteTemplate ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the template to delete.
Результат Postmark\Models\DynamicResponseModel

editServer() публичный метод

Modify the associated Server. Any parameters passed with NULL will be ignored (their existing values will not be modified).
public editServer ( string $name = NULL, string $color = NULL, boolean $rawEmailEnabled = NULL, boolean $smtpApiActivated = NULL, string $inboundHookUrl = NULL, string $bounceHookUrl = NULL, string $openHookUrl = NULL, boolean $postFirstOpenOnly = NULL, boolean $trackOpens = NULL, string $inboundDomain = NULL, integer $inboundSpamThreshold = NULL ) : Postmark\Models\DynamicResponseModel
$name string Set the name of the server.
$color string Set the color for the server in the Postmark WebUI (must be: 'purple', 'blue', 'turqoise', 'green', 'red', 'yellow', or 'grey')
$rawEmailEnabled boolean Enable raw email to be sent with inbound.
$smtpApiActivated boolean Specifies whether or not SMTP is enabled on this server.
$inboundHookUrl string URL to POST to everytime an inbound event occurs.
$bounceHookUrl string URL to POST to everytime a bounce event occurs.
$openHookUrl string URL to POST to everytime an open event occurs.
$postFirstOpenOnly boolean If set to true, only the first open by a particular recipient will initiate the open webhook. Any subsequent opens of the same email by the same recipient will not initiate the webhook.
$trackOpens boolean Indicates if all emails being sent through this server have open tracking enabled.
$inboundDomain string Inbound domain for MX setup.
$inboundSpamThreshold integer The maximum spam score for an inbound message before it's blocked (range from 0-30).
Результат Postmark\Models\DynamicResponseModel

editTagTrigger() публичный метод

Edit an existing Tag Trigger
public editTagTrigger ( integer $id, string $matchName, boolean $trackOpens = true ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the Tag Trigger we wish to modify.
$matchName string Name of the tag that will activate this trigger.
$trackOpens boolean Indicates if this trigger activates open tracking.
Результат Postmark\Models\DynamicResponseModel

editTemplate() публичный метод

Edit a template
public editTemplate ( integer $id, string $name = NULL, string $subject = NULL, string $htmlBody = NULL, string $textBody = NULL ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the template you wish to update.
$name string The friendly name for this template.
$subject string The template to be used for the 'subject' of emails sent using this template.
$htmlBody string The template to be used for the 'htmlBody' of emails sent using this template.
$textBody string The template to be used for the 'textBody' of emails sent using this template.
Результат Postmark\Models\DynamicResponseModel

getBounce() публичный метод

Locate information on a specific email bounce.
public getBounce ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the bounce to get.
Результат Postmark\Models\DynamicResponseModel

getBounceDump() публичный метод

Get a "dump" for a specific bounce.
public getBounceDump ( integer $id ) : string
$id integer The ID of the bounce for which we want a dump.
Результат string

getBounceTags() публичный метод

This produces an array of strings. This one of the only client API calls that does not produce a DynamicResponseModel.
public getBounceTags ( ) : array
Результат array

getBounces() публичный метод

Get a batch of bounces to be processed.
public getBounces ( integer $count = 100, integer $offset, string $type = NULL, boolean $inactive = NULL, string $emailFilter = NULL, string $tag = NULL, string $messageID = NULL )
$count integer Number of bounces to retrieve
$offset integer How many bounces to skip (when paging through bounces.)
$type string The bounce type. (see http://developer.postmarkapp.com/developer-api-bounce.html#bounce-types)
$inactive boolean Specifies if the bounce caused Postmark to deactivate this email.
$emailFilter string Filter by email address
$tag string Filter by tag
$messageID string Filter by MessageID :return DynamicResponseModel

getDeliveryStatistics() публичный метод

Get an overview of the delivery statistics for all email that has been sent through this Server.
public getDeliveryStatistics ( ) : Postmark\Models\DynamicResponseModel
Результат Postmark\Models\DynamicResponseModel

getInboundMessageDetails() публичный метод

Get details for a specific inbound message.
public getInboundMessageDetails ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the message for which we went to get details.
Результат Postmark\Models\DynamicResponseModel

getInboundMessages() публичный метод

Get messages sent to the inbound email address associated with this Server.
public getInboundMessages ( integer $count = 100, integer $offset, string $recipient = NULL, string $fromEmail = NULL, string $tag = NULL, string $subject = NULL, string $mailboxHash = NULL, string $status = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$count integer The number of inbounce messages to retrieve in the request (defaults to 100)
$offset integer The number of messages to 'skip' when 'paging' through messages (defaults to 0)
$recipient string Filter by the message recipient
$fromEmail string Filter by the message sender
$tag string Filter by the message tag
$subject string Filter by the message subject
$mailboxHash string Filter by the mailboxHash
$status string Filter by status ('blocked' or 'processed')
$fromdate string Filter to messages on or after YYYY-MM-DD
$todate string Filter to messages on or before YYYY-MM-DD
Результат Postmark\Models\DynamicResponseModel

getOpenStatistics() публичный метод

Get statistics for tracked messages, optionally filtering by various open event properties.
public getOpenStatistics ( integer $count = 100, integer $offset, string $recipient = NULL, string $tag = NULL, string $clientName = NULL, string $clientCompany = NULL, string $clientFamily = NULL, string $osName = NULL, string $osFamily = NULL, string $osCompany = NULL, string $platform = NULL, string $country = NULL, string $region = NULL, string $city = NULL ) : Postmark\Models\DynamicResponseModel
$count integer The number of open statistics to retrieve in this request.
$offset integer The number of statistics to 'skip' when paging through statistics.
$recipient string Filter by recipient.
$tag string Filter by tag.
$clientName string Filter by Email Client name.
$clientCompany string Filter by Email Client Company's name.
$clientFamily string Filter by Email Client's Family name.
$osName string Filter by Email Client's Operating System Name.
$osFamily string Filter by Email Client's Operating System's Family.
$osCompany string Filter by Email Client's Operating System's Company.
$platform string Filter by Email Client's Platform Name.
$country string Filter by Country.
$region string Filter by Region.
$city string Filter by City.
Результат Postmark\Models\DynamicResponseModel

getOpenStatisticsForMessage() публичный метод

Get information about individual opens for a sent message.
public getOpenStatisticsForMessage ( integer $id, integer $count = 100, integer $offset ) : Postmark\Models\DynamicResponseModel
$id integer The ID for the message that we want statistics for.
$count integer How many statistics should we retrieve?
$offset integer How many should we 'skip' when 'paging' through statistics.
Результат Postmark\Models\DynamicResponseModel

getOutboundBounceStatistics() публичный метод

Get bounce statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundBounceStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundClickBrowserFamilyStatistics() публичный метод

Get information about which browsers were used to open tracked links for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundClickBrowserFamilyStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundClickBrowserPlatformStatistics() публичный метод

Get information about which browsers platforms (Desktop, Mobile, etc.) were used to open tracked links for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundClickBrowserPlatformStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundClickLocationStatistics() публичный метод

Get information about part of the message (HTML or Text) tracked links were clicked from in messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundClickLocationStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundClickStatistics() публичный метод

Get click statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundClickStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundEmailClientStatistics() публичный метод

Get email client statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundEmailClientStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundMessageDetails() публичный метод

Get information related to a specific sent message.
public getOutboundMessageDetails ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the Message for which we want details.
Результат Postmark\Models\DynamicResponseModel

getOutboundMessageDump() публичный метод

This response
public getOutboundMessageDump ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the message for which we want a dump.
Результат Postmark\Models\DynamicResponseModel

getOutboundMessages() публичный метод

Search messages that have been sent using this Server.
public getOutboundMessages ( integer $count = 100, integer $offset, string $recipient = NULL, string $fromEmail = NULL, string $tag = NULL, string $subject = NULL, string $status = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$count integer How many messages to retrieve at once (defaults to 100)
$offset integer How many messages to skip when 'paging' through the massages (defaults to 0)
$recipient string Filter by recipient.
$fromEmail string Filter by sender email address.
$tag string Filter by tag.
$subject string Filter by subject.
$status string The current status for the outbound messages to return defaults to 'sent'
$fromdate string Filter to messages on or after YYYY-MM-DD
$todate string Filter to messages on or before YYYY-MM-DD
Результат Postmark\Models\DynamicResponseModel

getOutboundOpenStatistics() публичный метод

Get open statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundOpenStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundOverviewStatistics() публичный метод

Get an overview of the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundOverviewStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundPlatformStatistics() публичный метод

Get platform statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundPlatformStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundReadTimeStatistics() публичный метод

Get reading times for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundReadTimeStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundSendStatistics() публичный метод

Get send statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundSendStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundSpamComplaintStatistics() публичный метод

Get SPAM complaint statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundSpamComplaintStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getOutboundTrackedStatistics() публичный метод

Get bounce statistics for the messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundTrackedStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel

getServer() публичный метод

Get the settings for the server associated with this PostmarkClient instance (defined by the $server_token you passed when instantiating this client)
public getServer ( ) : Postmark\Models\DynamicResponseModel
Результат Postmark\Models\DynamicResponseModel

getTagTrigger() публичный метод

Retrieve information related to the associated Tag Trigger
public getTagTrigger ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID of the Tag Trigger we wish to retrieve.
Результат Postmark\Models\DynamicResponseModel

getTemplate() публичный метод

Get the current information for a specific template.
public getTemplate ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer the Id for the template info you wish to retrieve.
Результат Postmark\Models\DynamicResponseModel

listInboundRuleTriggers() публичный метод

Get a list of all existing Inbound Rule Triggers.
public listInboundRuleTriggers ( integer $count = 100, integer $offset ) : Postmark\Models\DynamicResponseModel
$count integer The number of rule triggers to return with this request.
$offset integer The number of triggers to 'skip' when 'paging' through rule triggers.
Результат Postmark\Models\DynamicResponseModel

listTemplates() публичный метод

Get all templates associated with the Server.
public listTemplates ( integer $count = 100, integer $offset ) : Postmark\Models\DynamicResponseModel
$count integer The total number of templates to get at once (default is 100)
$offset integer The number of templates to "Skip" before returning results.
Результат Postmark\Models\DynamicResponseModel

retryInboundMessageHook() публичный метод

Request that Postmark retry POSTing the specified message to the Server's Inbound Hook.
public retryInboundMessageHook ( integer $id ) : Postmark\Models\DynamicResponseModel
$id integer The ID for a message that we wish retry the inbound hook for.
Результат Postmark\Models\DynamicResponseModel

searchTagTriggers() публичный метод

Locate Tag Triggers matching the filter criteria.
public searchTagTriggers ( integer $count = 100, integer $offset, string $matchName = NULL ) : Postmark\Models\DynamicResponseModel
$count integer The number of triggers to return with this request.
$offset integer The number of triggers to 'skip' when 'paging' through tag triggers.
$matchName string
Результат Postmark\Models\DynamicResponseModel

sendEmail() публичный метод

Send an email.
public sendEmail ( string $from, string $to, string $subject, string $htmlBody = NULL, string $textBody = NULL, string $tag = NULL, boolean $trackOpens = true, string $replyTo = NULL, string $cc = NULL, string $bcc = NULL, array $headers = NULL, array $attachments = NULL, string $trackLinks = NULL ) : Postmark\Models\DynamicResponseModel
$from string The sender of the email. (Your account must have an associated Sender Signature for the address used.)
$to string The recipient of the email.
$subject string The subject of the email.
$htmlBody string The HTML content of the message, optional if Text Body is specified.
$textBody string The text content of the message, optional if HTML Body is specified.
$tag string A tag associated with this message, useful for classifying sent messages.
$trackOpens boolean True if you want Postmark to track opens of HTML emails.
$replyTo string Reply to email address.
$cc string Carbon Copy recipients, comma-separated
$bcc string Blind Carbon Copy recipients, comma-separated.
$headers array Headers to be included with the sent email message.
$attachments array An array of PostmarkAttachment objects.
$trackLinks string Can be any of "None", "HtmlAndText", "HtmlOnly", "TextOnly" to enable link tracking.
Результат Postmark\Models\DynamicResponseModel

sendEmailBatch() публичный метод

Each email is an associative array of values, but note that the 'Attachments' key must be an array of 'PostmarkAttachment' objects if you intend to send attachments with an email.
public sendEmailBatch ( array $emailBatch = [] ) : Postmark\Models\DynamicResponseModel
$emailBatch array An array of emails to be sent in one batch.
Результат Postmark\Models\DynamicResponseModel

sendEmailWithTemplate() публичный метод

Send an email using a template.
public sendEmailWithTemplate ( string $from, string $to, integer $templateId, object $templateModel, boolean $inlineCss = true, string $tag = NULL, boolean $trackOpens = true, string $replyTo = NULL, string $cc = NULL, string $bcc = NULL, array $headers = NULL, array $attachments = NULL, string $trackLinks = NULL ) : Postmark\Models\DynamicResponseModel
$from string The sender of the email. (Your account must have an associated Sender Signature for the address used.)
$to string The recipient of the email.
$templateId integer The ID of the template to use to generate the content of this message.
$templateModel object The values to combine with the Templated content.
$inlineCss boolean If the template contains an HTMLBody, CSS is automatically inlined, you may opt-out of this by passing 'false' for this parameter.
$tag string A tag associated with this message, useful for classifying sent messages.
$trackOpens boolean True if you want Postmark to track opens of HTML emails.
$replyTo string Reply to email address.
$cc string Carbon Copy recipients, comma-separated
$bcc string Blind Carbon Copy recipients, comma-separated.
$headers array Headers to be included with the sent email message.
$attachments array An array of PostmarkAttachment objects.
$trackLinks string Can be any of "None", "HtmlAndText", "HtmlOnly", "TextOnly" to enable link tracking.
Результат Postmark\Models\DynamicResponseModel

validateTemplate() публичный метод

Confirm that your template content can be parsed/rendered, get a test rendering of your template, and a suggested model to use with your templates.
public validateTemplate ( string $subject = NULL, string $htmlBody = NULL, string $textBody = NULL, object $testRenderModel = NULL, boolean $inlineCssForHtmlTestRender = true ) : Postmark\Models\DynamicResponseModel
$subject string The Subject template you wish to test.
$htmlBody string The HTML template you wish to test
$textBody string The number of templates to "Skip" before returning results.
$testRenderModel object The model to be used when doing test renders of the templates that successfully parse in this request.
$inlineCssForHtmlTestRender boolean If htmlBody is specified, the test render will automatically do CSS Inlining for the HTML content. You may opt-out of this behavior by passing 'false' for this parameter.
Результат Postmark\Models\DynamicResponseModel