class Illuminate / Mail / MailManager
You are viewing an older version of the documentation. For the latest, please visit master documentation.

MailManager

Implements

Properties

protected

$app Application

The application instance.

Default: null
protected

$mailers array

The array of resolved mailers.

Default: []
protected

$customCreators array

The registered custom driver creators.

Default: []

Methods

public

__construct ( $app ) : void

Create a new Mail manager instance.

Parameters

public

mailer ( $name ) : Mailer

Get a mailer instance by name.

Parameters

  • $name string|null
public

driver ( $driver ) : Mailer

Get a mailer driver instance.

Parameters

  • $driver string|null
protected

get ( $name ) : Mailer

Attempt to get the mailer from the local cache.

Parameters

  • $name string
protected

resolve ( $name ) : Mailer

Resolve the given mailer.

Parameters

  • $name string
protected

createSwiftMailer ( array $config ) : Swift_Mailer

Create the SwiftMailer instance for the given configuration.

Parameters

  • $config array
public

createTransport ( array $config ) : Swift_Transport

Create a new transport instance.

Parameters

  • $config array
protected

createSmtpTransport ( array $config ) : Swift_SmtpTransport

Create an instance of the SMTP Swift Transport driver.

Parameters

  • $config array
protected

configureSmtpTransport ( $transport , array $config ) : Swift_SmtpTransport

Configure the additional SMTP driver options.

Parameters

  • $transport Swift_SmtpTransport
  • $config array
protected

createSendmailTransport ( array $config ) : Swift_SendmailTransport

Create an instance of the Sendmail Swift Transport driver.

Parameters

  • $config array
protected

createSesTransport ( array $config ) : SesTransport

Create an instance of the Amazon SES Swift Transport driver.

Parameters

  • $config array
protected

addSesCredentials ( array $config ) : array

Add the SES credentials to the configuration array.

Parameters

  • $config array
protected

createMailTransport ( ) : Swift_SendmailTransport

Create an instance of the Mail Swift Transport driver.

protected

createMailgunTransport ( array $config ) : MailgunTransport

Create an instance of the Mailgun Swift Transport driver.

Parameters

  • $config array
protected

createPostmarkTransport ( array $config ) : Swift_Transport

Create an instance of the Postmark Swift Transport driver.

Parameters

  • $config array
protected

createFailoverTransport ( array $config ) : Swift_FailoverTransport

Create an instance of the Failover Swift Transport driver.

Parameters

  • $config array
protected

createLogTransport ( array $config ) : LogTransport

Create an instance of the Log Swift Transport driver.

Parameters

  • $config array
protected

createArrayTransport ( ) : ArrayTransport

Create an instance of the Array Swift Transport Driver.

protected

guzzle ( array $config ) : GuzzleHttp\Client

Get a fresh Guzzle HTTP client instance.

Parameters

  • $config array
protected

setGlobalAddress ( $mailer , array $config , string $type ) : void

Set a global address on the mailer by type.

Parameters

  • $mailer Mailer
  • $config array
  • $type string
protected

getConfig ( string $name ) : array

Get the mail connection configuration.

Parameters

  • $name string
public

getDefaultDriver ( ) : string

Get the default mail driver name.

public

setDefaultDriver ( string $name ) : void

Set the default mail driver name.

Parameters

  • $name string
public

purge ( $name ) : void

Disconnect the given mailer and remove from local cache.

Parameters

  • $name string|null
public

extend ( $driver , Closure $callback ) : $this

Register a custom transport creator Closure.

Parameters

public

getApplication ( ) : Application

Get the application instance used by the manager.

public

setApplication ( $app ) : $this

Set the application instance used by the manager.

Parameters

public

forgetMailers ( ) : $this

Forget all of the resolved mailer instances.

public

__call ( $method , $parameters ) : mixed

Dynamically call the default driver instance.

Parameters

  • $method string
  • $parameters array