PostmarkApiTransport
extends AbstractApiTransport
in package
Tags
Table of Contents
Constants
- HOST = 'api.postmarkapp.com'
Properties
- $client : mixed
- $host : mixed
- $port : mixed
- $dispatcher : mixed
- $key : mixed
- $lastSent : mixed
- $logger : mixed
- $messageStream : mixed
- $rate : mixed
Methods
- __construct() : mixed
- __toString() : string
- send() : SentMessage|null
- setHost() : $this
- setMaxPerSecond() : $this
- Sets the maximum number of messages to send per second (0 to disable).
- setMessageStream() : $this
- setPort() : $this
- doSend() : void
- doSendApi() : ResponseInterface
- doSendHttp() : ResponseInterface
- getLogger() : LoggerInterface
- getRecipients() : array<string|int, mixed>
- stringifyAddresses() : array<string|int, string>
- checkThrottling() : mixed
- getAttachments() : array<string|int, mixed>
- getEndpoint() : string|null
- getPayload() : array<string|int, mixed>
Constants
HOST
private
mixed
HOST
= 'api.postmarkapp.com'
Properties
$client
protected
mixed
$client
$host
protected
mixed
$host
$port
protected
mixed
$port
$dispatcher
private
mixed
$dispatcher
$key
private
mixed
$key
$lastSent
private
mixed
$lastSent
= 0
$logger
private
mixed
$logger
$messageStream
private
mixed
$messageStream
$rate
private
mixed
$rate
= 0
Methods
__construct()
public
__construct(string $key[, HttpClientInterface|null $client = null ][, EventDispatcherInterface|null $dispatcher = null ][, LoggerInterface|null $logger = null ]) : mixed
Parameters
- $key : string
- $client : HttpClientInterface|null = null
- $dispatcher : EventDispatcherInterface|null = null
- $logger : LoggerInterface|null = null
__toString()
public
__toString() : string
Return values
stringsend()
public
send(RawMessage $message[, Envelope|null $envelope = null ]) : SentMessage|null
Parameters
- $message : RawMessage
- $envelope : Envelope|null = null
Return values
SentMessage|nullsetHost()
public
setHost(string|null $host) : $this
Parameters
- $host : string|null
Return values
$thissetMaxPerSecond()
Sets the maximum number of messages to send per second (0 to disable).
public
setMaxPerSecond(float $rate) : $this
Parameters
- $rate : float
Return values
$thissetMessageStream()
public
setMessageStream(string $messageStream) : $this
Parameters
- $messageStream : string
Return values
$thissetPort()
public
setPort(int|null $port) : $this
Parameters
- $port : int|null
Return values
$thisdoSend()
protected
doSend(SentMessage $message) : void
Parameters
- $message : SentMessage
doSendApi()
protected
doSendApi(SentMessage $sentMessage, Email $email, Envelope $envelope) : ResponseInterface
Parameters
- $sentMessage : SentMessage
- $email : Email
- $envelope : Envelope
Return values
ResponseInterfacedoSendHttp()
protected
doSendHttp(SentMessage $message) : ResponseInterface
Parameters
- $message : SentMessage
Return values
ResponseInterfacegetLogger()
protected
getLogger() : LoggerInterface
Return values
LoggerInterfacegetRecipients()
protected
getRecipients(Email $email, Envelope $envelope) : array<string|int, mixed>
Parameters
Return values
array<string|int, mixed>stringifyAddresses()
protected
stringifyAddresses(array<string|int, Address> $addresses) : array<string|int, string>
Parameters
- $addresses : array<string|int, Address>
Return values
array<string|int, string>checkThrottling()
private
checkThrottling() : mixed
getAttachments()
private
getAttachments(Email $email) : array<string|int, mixed>
Parameters
- $email : Email
Return values
array<string|int, mixed>getEndpoint()
private
getEndpoint() : string|null
Return values
string|nullgetPayload()
private
getPayload(Email $email, Envelope $envelope) : array<string|int, mixed>