class MailgunTransport extends Transport

Properties

array $plugins

The plug-ins registered with the transport.

from  Transport
protected ClientInterface $client

Guzzle client instance.

protected string $key

The Mailgun API key.

protected string $domain

The Mailgun domain.

protected string $url

THe Mailgun API end-point.

Methods

isStarted()

{@inheritdoc}

start()

{@inheritdoc}

stop()

{@inheritdoc}

void
registerPlugin(Swift_Events_EventListener $plugin)

Register a plug-in with the transport.

void
beforeSendPerformed(Swift_Mime_Message $message)

Iterate through registered plugins and execute plugins' methods.

void
sendPerformed(Swift_Mime_Message $message)

Iterate through registered plugins and execute plugins' methods.

int
numberOfRecipients(Swift_Mime_Message $message)

Get the number of recipients.

void
__construct(ClientInterface $client, string $key, string $domain)

Create a new Mailgun transport instance.

send(Swift_Mime_Message $message, $failedRecipients = null)

{@inheritdoc}

array
payload(Swift_Mime_Message $message, string $to)

Get the HTTP payload for sending the Mailgun message.

string
getTo(Swift_Mime_Message $message)

Get the "to" payload field for the API request.

array
allContacts(Swift_Mime_Message $message)

Get all of the contacts for the message.

string
getKey()

Get the API key being used by the transport.

string
setKey(string $key)

Set the API key being used by the transport.

string
getDomain()

Get the domain being used by the transport.

void
setDomain(string $domain)

Set the domain being used by the transport.

Details

in Transport at line 22
isStarted()

{@inheritdoc}

in Transport at line 30
start()

{@inheritdoc}

in Transport at line 38
stop()

{@inheritdoc}

in Transport at line 49
void registerPlugin(Swift_Events_EventListener $plugin)

Register a plug-in with the transport.

Parameters

Swift_Events_EventListener $plugin

Return Value

void

in Transport at line 60
protected void beforeSendPerformed(Swift_Mime_Message $message)

Iterate through registered plugins and execute plugins' methods.

Parameters

Swift_Mime_Message $message

Return Value

void

in Transport at line 77
protected void sendPerformed(Swift_Mime_Message $message)

Iterate through registered plugins and execute plugins' methods.

Parameters

Swift_Mime_Message $message

Return Value

void

in Transport at line 94
protected int numberOfRecipients(Swift_Mime_Message $message)

Get the number of recipients.

Parameters

Swift_Mime_Message $message

Return Value

int

at line 46
void __construct(ClientInterface $client, string $key, string $domain)

Create a new Mailgun transport instance.

Parameters

ClientInterface $client
string $key
string $domain

Return Value

void

at line 56
send(Swift_Mime_Message $message, $failedRecipients = null)

{@inheritdoc}

Parameters

Swift_Mime_Message $message
$failedRecipients

at line 78
protected array payload(Swift_Mime_Message $message, string $to)

Get the HTTP payload for sending the Mailgun message.

Parameters

Swift_Mime_Message $message
string $to

Return Value

array

at line 105
protected string getTo(Swift_Mime_Message $message)

Get the "to" payload field for the API request.

Parameters

Swift_Mime_Message $message

Return Value

string

at line 118
protected array allContacts(Swift_Mime_Message $message)

Get all of the contacts for the message.

Parameters

Swift_Mime_Message $message

Return Value

array

at line 130
string getKey()

Get the API key being used by the transport.

Return Value

string

at line 141
string setKey(string $key)

Set the API key being used by the transport.

Parameters

string $key

Return Value

string

at line 151
string getDomain()

Get the domain being used by the transport.

Return Value

string

at line 162
void setDomain(string $domain)

Set the domain being used by the transport.

Parameters

string $domain

Return Value

void