MailManager
class MailManager implements Factory (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. | |
Swift_Mailer | createSwiftMailer(array $config) Create the SwiftMailer instance for the given configuration. | |
Swift_Transport | createTransport(array $config) Create a new transport instance. | |
Swift_SmtpTransport | createSmtpTransport(array $config) Create an instance of the SMTP Swift Transport driver. | |
Swift_SmtpTransport | configureSmtpTransport(Swift_SmtpTransport $transport, array $config) Configure the additional SMTP driver options. | |
Swift_SendmailTransport | createSendmailTransport(array $config) Create an instance of the Sendmail Swift Transport driver. | |
SesTransport | createSesTransport(array $config) Create an instance of the Amazon SES Swift Transport driver. | |
array | addSesCredentials(array $config) Add the SES credentials to the configuration array. | |
Swift_SendmailTransport | createMailTransport() Create an instance of the Mail Swift Transport driver. | |
MailgunTransport | createMailgunTransport(array $config) Create an instance of the Mailgun Swift Transport driver. | |
Swift_Transport | createPostmarkTransport(array $config) Create an instance of the Postmark Swift Transport driver. | |
LogTransport | createLogTransport(array $config) Create an instance of the Log Swift Transport driver. | |
ArrayTransport | createArrayTransport() Create an instance of the Array Swift Transport Driver. | |
Client | guzzle(array $config) Get a fresh Guzzle 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. | |
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.
protected Swift_Mailer createSwiftMailer(array $config)
Create the SwiftMailer instance for the given configuration.
Swift_Transport createTransport(array $config)
Create a new transport instance.
protected Swift_SmtpTransport createSmtpTransport(array $config)
Create an instance of the SMTP Swift Transport driver.
protected Swift_SmtpTransport configureSmtpTransport(Swift_SmtpTransport $transport, array $config)
Configure the additional SMTP driver options.
protected Swift_SendmailTransport createSendmailTransport(array $config)
Create an instance of the Sendmail Swift Transport driver.
protected SesTransport createSesTransport(array $config)
Create an instance of the Amazon SES Swift Transport driver.
protected array addSesCredentials(array $config)
Add the SES credentials to the configuration array.
protected Swift_SendmailTransport createMailTransport()
Create an instance of the Mail Swift Transport driver.
protected MailgunTransport createMailgunTransport(array $config)
Create an instance of the Mailgun Swift Transport driver.
protected Swift_Transport createPostmarkTransport(array $config)
Create an instance of the Postmark Swift Transport driver.
protected LogTransport createLogTransport(array $config)
Create an instance of the Log Swift Transport driver.
protected ArrayTransport createArrayTransport()
Create an instance of the Array Swift Transport Driver.
protected Client guzzle(array $config)
Get a fresh Guzzle 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.
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/8.x/Illuminate/Mail/MailManager.html