MailgunTransport

class MailgunTransport extends Transport (View source)

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 email domain.
protected string $endpoint The Mailgun API end-point.

Methods

isStarted()

{@inheritdoc}

from Transport
start()

{@inheritdoc}

from Transport
stop()

{@inheritdoc}

from Transport
ping()

{@inheritdoc}

from Transport
void registerPlugin(Swift_Events_EventListener $plugin)

Register a plug-in with the transport.

from Transport
void beforeSendPerformed(Swift_Mime_SimpleMessage $message)

Iterate through registered plugins and execute plugins' methods.

from Transport
void sendPerformed(Swift_Mime_SimpleMessage $message)

Iterate through registered plugins and execute plugins' methods.

from Transport
int numberOfRecipients(Swift_Mime_SimpleMessage $message)

Get the number of recipients.

from Transport
void __construct(ClientInterface $client, string $key, string $domain, string|null $endpoint = null)

Create a new Mailgun transport instance.

send(Swift_Mime_SimpleMessage $message, $failedRecipients = null)

{@inheritdoc}

array payload(Swift_Mime_SimpleMessage $message, string $to)

Get the HTTP payload for sending the Mailgun message.

string getTo(Swift_Mime_SimpleMessage $message)

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

array allContacts(Swift_Mime_SimpleMessage $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.

string setDomain(string $domain)

Set the domain being used by the transport.

Details

isStarted()

{@inheritdoc}

start()

{@inheritdoc}

stop()

{@inheritdoc}

ping()

{@inheritdoc}

void registerPlugin(Swift_Events_EventListener $plugin)

Register a plug-in with the transport.

Parameters

Swift_Events_EventListener $plugin

Return Value

void

protected void beforeSendPerformed(Swift_Mime_SimpleMessage $message)

Iterate through registered plugins and execute plugins' methods.

Parameters

Swift_Mime_SimpleMessage $message

Return Value

void

protected void sendPerformed(Swift_Mime_SimpleMessage $message)

Iterate through registered plugins and execute plugins' methods.

Parameters

Swift_Mime_SimpleMessage $message

Return Value

void

protected int numberOfRecipients(Swift_Mime_SimpleMessage $message)

Get the number of recipients.

Parameters

Swift_Mime_SimpleMessage $message

Return Value

int

void __construct(ClientInterface $client, string $key, string $domain, string|null $endpoint = null)

Create a new Mailgun transport instance.

Parameters

ClientInterface $client
string $key
string $domain
string|null $endpoint

Return Value

void

send(Swift_Mime_SimpleMessage $message, $failedRecipients = null)

{@inheritdoc}

Parameters

Swift_Mime_SimpleMessage $message
$failedRecipients

protected array payload(Swift_Mime_SimpleMessage $message, string $to)

Get the HTTP payload for sending the Mailgun message.

Parameters

Swift_Mime_SimpleMessage $message
string $to

Return Value

array

protected string getTo(Swift_Mime_SimpleMessage $message)

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

Parameters

Swift_Mime_SimpleMessage $message

Return Value

string

protected array allContacts(Swift_Mime_SimpleMessage $message)

Get all of the contacts for the message.

Parameters

Swift_Mime_SimpleMessage $message

Return Value

array

string getKey()

Get the API key being used by the transport.

Return Value

string

string setKey(string $key)

Set the API key being used by the transport.

Parameters

string $key

Return Value

string

string getDomain()

Get the domain being used by the transport.

Return Value

string

string setDomain(string $domain)

Set the domain being used by the transport.

Parameters

string $domain

Return Value

string

© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
https://laravel.com/api/5.7/Illuminate/Mail/Transport/MailgunTransport.html