On this page
MailManager
class MailManager implements Factory mixin Mailer (View source)
Properties
| protected Application | $app | The application instance.  | 
      |
| protected array | $mailers | The array of resolved mailers.  | 
      |
| protected array | $customCreators | The registered custom driver creators.  | 
      
Methods
| void | __construct(Application $app)  Create a new Mail manager instance.  | 
      |
| Mailer | mailer(string|null $name = null)  Get a mailer instance by name.  | 
      |
| Mailer | driver(string|null $driver = null)  Get a mailer driver instance.  | 
      |
| Mailer | get(string $name)  Attempt to get the mailer from the local cache.  | 
      |
| Mailer | resolve(string $name)  Resolve the given mailer.  | 
      |
| TransportInterface | createSymfonyTransport(array $config)  Create a new transport instance.  | 
      |
| EsmtpTransport | createSmtpTransport(array $config)  Create an instance of the Symfony SMTP Transport driver.  | 
      |
| EsmtpTransport | configureSmtpTransport(EsmtpTransport $transport, array $config)  Configure the additional SMTP driver options.  | 
      |
| SendmailTransport | createSendmailTransport(array $config)  Create an instance of the Symfony Sendmail Transport driver.  | 
      |
| SesTransport | createSesTransport(array $config)  Create an instance of the Symfony Amazon SES Transport driver.  | 
      |
| Se2VwTransport | createSesV2Transport(array $config)  Create an instance of the Symfony Amazon SES V2 Transport driver.  | 
      |
| array | addSesCredentials(array $config)  Add the SES credentials to the configuration array.  | 
      |
| SendmailTransport | createMailTransport()  Create an instance of the Symfony Mail Transport driver.  | 
      |
| TransportInterface | createMailgunTransport(array $config)  Create an instance of the Symfony Mailgun Transport driver.  | 
      |
| PostmarkApiTransport | createPostmarkTransport(array $config)  Create an instance of the Symfony Postmark Transport driver.  | 
      |
| FailoverTransport | createFailoverTransport(array $config)  Create an instance of the Symfony Failover Transport driver.  | 
      |
| LogTransport | createLogTransport(array $config)  Create an instance of the Log Transport driver.  | 
      |
| ArrayTransport | createArrayTransport()  Create an instance of the Array Transport Driver.  | 
      |
| HttpClientInterface|null | getHttpClient(array $config)  Get a configured Symfony HTTP client instance.  | 
      |
| void | setGlobalAddress(Mailer $mailer, array $config, string $type)  Set a global address on the mailer by type.  | 
      |
| array | getConfig(string $name)  Get the mail connection configuration.  | 
      |
| string | getDefaultDriver()  Get the default mail driver name.  | 
      |
| void | setDefaultDriver(string $name)  Set the default mail driver name.  | 
      |
| void | purge(string|null $name = null)  Disconnect the given mailer and remove from local cache.  | 
      |
| $this | extend(string $driver, Closure $callback)  Register a custom transport creator Closure.  | 
      |
| Application | getApplication()  Get the application instance used by the manager.  | 
      |
| $this | setApplication(Application $app)  Set the application instance used by the manager.  | 
      |
| $this | forgetMailers()  Forget all of the resolved mailer instances.  | 
      |
| mixed | __call(string $method, array $parameters)  Dynamically call the default driver instance.  | 
      
Details
void __construct(Application $app)
Create a new Mail manager instance.
Mailer mailer(string|null $name = null)
Get a mailer instance by name.
Mailer driver(string|null $driver = null)
Get a mailer driver instance.
protected Mailer get(string $name)
Attempt to get the mailer from the local cache.
protected Mailer resolve(string $name)
Resolve the given mailer.
TransportInterface createSymfonyTransport(array $config)
Create a new transport instance.
protected EsmtpTransport createSmtpTransport(array $config)
Create an instance of the Symfony SMTP Transport driver.
protected EsmtpTransport configureSmtpTransport(EsmtpTransport $transport, array $config)
Configure the additional SMTP driver options.
protected SendmailTransport createSendmailTransport(array $config)
Create an instance of the Symfony Sendmail Transport driver.
protected SesTransport createSesTransport(array $config)
Create an instance of the Symfony Amazon SES Transport driver.
protected Se2VwTransport createSesV2Transport(array $config)
Create an instance of the Symfony Amazon SES V2 Transport driver.
protected array addSesCredentials(array $config)
Add the SES credentials to the configuration array.
protected SendmailTransport createMailTransport()
Create an instance of the Symfony Mail Transport driver.
protected TransportInterface createMailgunTransport(array $config)
Create an instance of the Symfony Mailgun Transport driver.
protected PostmarkApiTransport createPostmarkTransport(array $config)
Create an instance of the Symfony Postmark Transport driver.
protected FailoverTransport createFailoverTransport(array $config)
Create an instance of the Symfony Failover Transport driver.
protected LogTransport createLogTransport(array $config)
Create an instance of the Log Transport driver.
protected ArrayTransport createArrayTransport()
Create an instance of the Array Transport Driver.
protected HttpClientInterface|null getHttpClient(array $config)
Get a configured Symfony HTTP client instance.
protected void setGlobalAddress(Mailer $mailer, array $config, string $type)
Set a global address on the mailer by type.
protected array getConfig(string $name)
Get the mail connection configuration.
string getDefaultDriver()
Get the default mail driver name.
void setDefaultDriver(string $name)
Set the default mail driver name.
void purge(string|null $name = null)
Disconnect the given mailer and remove from local cache.
$this extend(string $driver, Closure $callback)
Register a custom transport creator Closure.
Application getApplication()
Get the application instance used by the manager.
$this setApplication(Application $app)
Set the application instance used by the manager.
$this forgetMailers()
Forget all of the resolved mailer instances.
mixed __call(string $method, array $parameters)
Dynamically call the default driver instance.
© Taylor Otwell
Licensed under the MIT License.
Laravel is a trademark of Taylor Otwell.
 https://laravel.com/api/10.x/Illuminate/Mail/MailManager.html