class Illuminate / Mail / MailManager
You're browsing the documentation for an upcoming version of Laravel. The documentation and features of this release are subject to change.

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
public

createSymfonyTransport ( array $config ) : Symfony\...\TransportInterface

Create a new transport instance.

Parameters

  • $config array
protected

createSmtpTransport ( array $config ) : Symfony\...\EsmtpTransport

Create an instance of the Symfony SMTP Transport driver.

Parameters

  • $config array
protected

configureSmtpTransport ( Symfony\...\EsmtpTransport $transport , array $config ) : Symfony\...\EsmtpTransport

Configure the additional SMTP driver options.

Parameters

  • $transport Symfony\...\EsmtpTransport
  • $config array
protected

createSendmailTransport ( array $config ) : Symfony\...\SendmailTransport

Create an instance of the Symfony Sendmail Transport driver.

Parameters

  • $config array
protected

createSesTransport ( array $config ) : SesTransport

Create an instance of the Symfony Amazon SES Transport driver.

Parameters

  • $config array
protected

createSesV2Transport ( array $config ) : Illuminate\...\Se2VwTransport

Create an instance of the Symfony Amazon SES V2 Transport driver.

Parameters

  • $config array
protected

addSesCredentials ( array $config ) : array

Add the SES credentials to the configuration array.

Parameters

  • $config array
protected

createMailTransport ( ) : Symfony\...\SendmailTransport

Create an instance of the Symfony Mail Transport driver.

protected

createMailgunTransport ( array $config ) : Symfony\...\TransportInterface

Create an instance of the Symfony Mailgun Transport driver.

Parameters

  • $config array
protected

createPostmarkTransport ( array $config ) : Symfony\...\PostmarkApiTransport

Create an instance of the Symfony Postmark Transport driver.

Parameters

  • $config array
protected

createFailoverTransport ( array $config ) : Symfony\...\FailoverTransport

Create an instance of the Symfony Failover Transport driver.

Parameters

  • $config array
protected

createLogTransport ( array $config ) : LogTransport

Create an instance of the Log Transport driver.

Parameters

  • $config array
protected

createArrayTransport ( ) : ArrayTransport

Create an instance of the Array Transport Driver.

protected

getHttpClient ( array $config ) : Symfony\...\HttpClientInterface|null

Get a configured Symfony HTTP client instance.

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