PHP Class Mailgun\Mailgun

See the official documentation (link below) for usage instructions.
Afficher le fichier Open project: mailgun/mailgun-php Class Usage Examples

Protected Properties

Свойство Type Description
$apiKey null | string
$restClient Mailgun\Connection\RestClient

Méthodes publiques

Méthode Description
BatchMessage ( string $workingDomain, boolean $autoSend = true ) : BatchMessage
MessageBuilder ( ) : MessageBuilder
OptInHandler ( ) : OptInHandler
__construct ( string | null $apiKey = null, Http\Client\HttpClient $httpClient = null, string $apiEndpoint = 'api.mailgun.net', Mailgun\Deserializer\ResponseDeserializer $deserializer = null, HttpClientConfigurator $clientConfigurator = null, RequestBuilder $requestBuilder = null )
delete ( string $endpointUrl ) : stdClass
domains ( ) : Domain
get ( string $endpointUrl, array $queryString = [] ) : stdClass
post ( string $endpointUrl, array $postData = [], array $files = [] ) : stdClass
put ( string $endpointUrl, array $putData ) : stdClass
sendMessage ( string $workingDomain, array $postData, array $postFiles = [] ) : stdClass This function allows the sending of a fully formed message OR a custom MIME string. If sending MIME, the string must be passed in to the 3rd position of the function call.
setApiVersion ( string $apiVersion ) : Mailgun
setSslEnabled ( boolean $sslEnabled ) : Mailgun
stats ( ) : Api\Stats
verifyWebhookSignature ( array | null $postData = null ) : boolean This function checks the signature in a POST request to see if it is authentic.

Method Details

BatchMessage() public méthode

public BatchMessage ( string $workingDomain, boolean $autoSend = true ) : BatchMessage
$workingDomain string
$autoSend boolean
Résultat Mailgun\Messages\BatchMessage

MessageBuilder() public méthode

public MessageBuilder ( ) : MessageBuilder
Résultat Mailgun\Messages\MessageBuilder

OptInHandler() public méthode

public OptInHandler ( ) : OptInHandler
Résultat Mailgun\Lists\OptInHandler

__construct() public méthode

public __construct ( string | null $apiKey = null, Http\Client\HttpClient $httpClient = null, string $apiEndpoint = 'api.mailgun.net', Mailgun\Deserializer\ResponseDeserializer $deserializer = null, HttpClientConfigurator $clientConfigurator = null, RequestBuilder $requestBuilder = null )
$apiKey string | null
$httpClient Http\Client\HttpClient
$apiEndpoint string
$deserializer Mailgun\Deserializer\ResponseDeserializer
$clientConfigurator HttpClientConfigurator
$requestBuilder RequestBuilder

delete() public méthode

public delete ( string $endpointUrl ) : stdClass
$endpointUrl string
Résultat stdClass

domains() public méthode

public domains ( ) : Domain
Résultat Mailgun\Api\Domain

get() public méthode

public get ( string $endpointUrl, array $queryString = [] ) : stdClass
$endpointUrl string
$queryString array
Résultat stdClass

post() public méthode

public post ( string $endpointUrl, array $postData = [], array $files = [] ) : stdClass
$endpointUrl string
$postData array
$files array
Résultat stdClass

put() public méthode

public put ( string $endpointUrl, array $putData ) : stdClass
$endpointUrl string
$putData array
Résultat stdClass

sendMessage() public méthode

This function allows the sending of a fully formed message OR a custom MIME string. If sending MIME, the string must be passed in to the 3rd position of the function call.
public sendMessage ( string $workingDomain, array $postData, array $postFiles = [] ) : stdClass
$workingDomain string
$postData array
$postFiles array
Résultat stdClass

setApiVersion() public méthode

public setApiVersion ( string $apiVersion ) : Mailgun
$apiVersion string
Résultat Mailgun

setSslEnabled() public méthode

Deprecation: This will be removed in 3.0. Mailgun does not support non-secure connections to their API.
public setSslEnabled ( boolean $sslEnabled ) : Mailgun
$sslEnabled boolean
Résultat Mailgun

stats() public méthode

public stats ( ) : Api\Stats
Résultat Api\Stats

verifyWebhookSignature() public méthode

Pass an array of parameters. If you pass nothing, $_POST will be used instead. If this function returns FALSE, you must not process the request. You should reject the request with status code 403 Forbidden.
public verifyWebhookSignature ( array | null $postData = null ) : boolean
$postData array | null
Résultat boolean

Property Details

$apiKey protected_oe property

protected null|string $apiKey
Résultat null | string

$restClient protected_oe property

protected RestClient,Mailgun\Connection $restClient
Résultat Mailgun\Connection\RestClient