class
Illuminate
/
Mail
/
Transport
/
MailgunTransport
You are viewing an older version of the documentation. For the latest, please visit master documentation.
MailgunTransport
Extends
Properties
protected
$client GuzzleHttp\ClientInterface
Guzzle client instance.
Default: null
protected
$key string
The Mailgun API key.
Default: null
protected
$domain string
The Mailgun email domain.
Default: null
protected
$endpoint string
The Mailgun API endpoint.
Default: null
Methods
public
__construct ( GuzzleHttp\ClientInterface $client , $key , $domain , $endpoint ) : void
Create a new Mailgun transport instance.
Parameters
- $client GuzzleHttp\ClientInterface
- $key string
- $domain string
- $endpoint string|null
public
send ( Swift_Mime_SimpleMessage $message , $failedRecipients ) : int
{@inheritdoc}
protected
payload ( Swift_Mime_SimpleMessage $message , $to ) : array
Get the HTTP payload for sending the Mailgun message.
Parameters
- $message Swift_Mime_SimpleMessage
- $to string
protected
getTo ( Swift_Mime_SimpleMessage $message ) : string
Get the "to" payload field for the API request.
Parameters
- $message Swift_Mime_SimpleMessage
protected
allContacts ( Swift_Mime_SimpleMessage $message ) : array
Get all of the contacts for the message.
Parameters
- $message Swift_Mime_SimpleMessage
protected
getMessageId ( $response ) : string
Get the message ID from the response.
Parameters
- $response Psr\...\ResponseInterface
public
getKey ( ) : string
Get the API key being used by the transport.
public
setKey ( $key ) : string
Set the API key being used by the transport.
Parameters
- $key string
public
getDomain ( ) : string
Get the domain being used by the transport.
public
setDomain ( $domain ) : string
Set the domain being used by the transport.
Parameters
- $domain string
public
getEndpoint ( ) : string
Get the API endpoint being used by the transport.
public
setEndpoint ( $endpoint ) : string
Set the API endpoint being used by the transport.
Parameters
- $endpoint string