October\Rain\Mail\Transport\SparkPostTransport

Extends:

  • Illuminate\Mail\Transport\Transport

Implements:

  • Swift_Transport

Public properties

There are no public properties in the class.

Show inherited public properties

Inherited public properties

  • public array $plugins - defined in Illuminate\Mail\Transport\Transport. The plug-ins registered with the transport.

Protected properties

protected GuzzleHttp\ClientInterface $client

Guzzle client instance.

protected string $key

The SparkPost API key.

protected array $options

The SparkPost transmission options.

Public methods

public void __construct(GuzzleHttp\ClientInterface $client, string $key, array $options=array())

Create a new SparkPost transport instance.

Parameters
  • GuzzleHttp\ClientInterface $client
  • string $key
  • array $options

public string getEndpoint()

Get the SparkPost API endpoint.

public string getKey()

Get the API key being used by the transport.

public array getOptions()

Get the transmission options being used by the transport.

public void send($message, &$failedRecipients=NULL)

{@inheritdoc}

Parameters
  • $message
  • &$failedRecipients

public string setKey(string $key)

Set the API key being used by the transport.

Parameters
  • string $key

public array setOptions(array $options)

Set the transmission options being used by the transport.

Parameters
  • array $options

Show inherited public methods

Inherited public methods

  • public void isStarted() - defined in Illuminate\Mail\Transport\Transport. {@inheritdoc}.
  • public void ping() - defined in Illuminate\Mail\Transport\Transport. {@inheritdoc}.
  • public void registerPlugin(Swift_Events_EventListener $plugin) - defined in Illuminate\Mail\Transport\Transport. Register a plug-in with the transport.
  • public void start() - defined in Illuminate\Mail\Transport\Transport. {@inheritdoc}.
  • public void stop() - defined in Illuminate\Mail\Transport\Transport. {@inheritdoc}.

Protected methods

protected array getRecipients(Swift_Mime_SimpleMessage $message)

Get all the addresses this message should be sent to.

Note that SparkPost still respects CC, BCC headers in raw message itself.

Parameters
  • Swift_Mime_SimpleMessage $message

protected string getTransmissionId(GuzzleHttp\Psr7\Response $response)

Get the transmission ID from the response.

Parameters
  • GuzzleHttp\Psr7\Response $response

Show inherited protected methods

Inherited protected methods

  • protected void beforeSendPerformed(Swift_Mime_SimpleMessage $message) - defined in Illuminate\Mail\Transport\Transport. Iterate through registered plugins and execute plugins' methods.
  • protected int numberOfRecipients(Swift_Mime_SimpleMessage $message) - defined in Illuminate\Mail\Transport\Transport. Get the number of recipients.
  • protected void sendPerformed(Swift_Mime_SimpleMessage $message) - defined in Illuminate\Mail\Transport\Transport. Iterate through registered plugins and execute plugins' methods.