MailManager
Implements
Properties
$mailers array
The array of resolved mailers.
$customCreators array
The registered custom driver creators.
Methods
get ( $name ) : Mailer
Attempt to get the mailer from the local cache.
Parameters
- $name string
createSwiftMailer ( array $config ) : Swift_Mailer
Create the SwiftMailer instance for the given configuration.
Parameters
- $config array
createTransport ( array $config ) : Swift_Transport
Create a new transport instance.
Parameters
- $config array
createSmtpTransport ( array $config ) : Swift_SmtpTransport
Create an instance of the SMTP Swift Transport driver.
Parameters
- $config array
configureSmtpTransport ( $transport , array $config ) : Swift_SmtpTransport
Configure the additional SMTP driver options.
Parameters
- $transport Swift_SmtpTransport
- $config array
createSendmailTransport ( array $config ) : Swift_SendmailTransport
Create an instance of the Sendmail Swift Transport driver.
Parameters
- $config array
createSesTransport ( array $config ) : SesTransport
Create an instance of the Amazon SES Swift Transport driver.
Parameters
- $config array
addSesCredentials ( array $config ) : array
Add the SES credentials to the configuration array.
Parameters
- $config array
createMailTransport ( ) : Swift_SendmailTransport
Create an instance of the Mail Swift Transport driver.
createMailgunTransport ( array $config ) : MailgunTransport
Create an instance of the Mailgun Swift Transport driver.
Parameters
- $config array
createPostmarkTransport ( array $config ) : Swift_Transport
Create an instance of the Postmark Swift Transport driver.
Parameters
- $config array
createFailoverTransport ( array $config ) : Swift_FailoverTransport
Create an instance of the Failover Swift Transport driver.
Parameters
- $config array
createLogTransport ( array $config ) : LogTransport
Create an instance of the Log Swift Transport driver.
Parameters
- $config array
createArrayTransport ( ) : ArrayTransport
Create an instance of the Array Swift Transport Driver.
guzzle ( array $config ) : GuzzleHttp\Client
Get a fresh Guzzle HTTP client instance.
Parameters
- $config array
setGlobalAddress ( $mailer , array $config , string $type ) : void
Set a global address on the mailer by type.
Parameters
- $mailer Mailer
- $config array
- $type string
getConfig ( string $name ) : array
Get the mail connection configuration.
Parameters
- $name string
getDefaultDriver ( ) : string
Get the default mail driver name.
setDefaultDriver ( string $name ) : void
Set the default mail driver name.
Parameters
- $name string
purge ( $name ) : void
Disconnect the given mailer and remove from local cache.
Parameters
- $name string|null
extend ( $driver , Closure $callback ) : $this
Register a custom transport creator Closure.
Parameters
- $driver string
- $callback Closure
setApplication ( $app ) : $this
Set the application instance used by the manager.
Parameters
- $app Application
forgetMailers ( ) : $this
Forget all of the resolved mailer instances.
__call ( $method , $parameters ) : mixed
Dynamically call the default driver instance.
Parameters
- $method string
- $parameters array