Trait MailerAwareTrait

Provides functionality for loading mailer classes onto properties of the host object.

Example users of this trait are Cake\Controller\Controller and Cake\Console\Command.

Namespace: Cake\Mailer

Method Summary

Method Detail

getMailer() protected

getMailer(string $name, mixed $config)

Returns a mailer instance.

Parameters

string $name

Mailer's name.

array|string|null $config optional

Array of configs, or profile name string.

Returns

\Cake\Mailer\Mailer

Throws

Cake\Mailer\Exception\MissingMailerException
if undefined mailer class.

© 2005–present The Cake Software Foundation, Inc.
Licensed under the MIT License.
CakePHP is a registered trademark of Cake Software Foundation, Inc.
We are not endorsed by or affiliated with CakePHP.
https://api.cakephp.org/4.1/trait-Cake.Mailer.MailerAwareTrait.html