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\Shell.
Namespace: Cake\Mailer
Method Summary
-
getMailer() protected
Returns a mailer instance.
Method Detail
getMailer() ΒΆ protected
getMailer(string $name, Cake\Mailer\Email|null $email = null): Cake\Mailer\Mailer
Returns a mailer instance.
Parameters
-
string
$name Mailer's name.
-
Cake\Mailer\Email|null
$email optional Email instance.
Returns
Cake\Mailer\Mailer
Throws
Cake\Mailer\Exception\MissingMailerException
if undefined mailer class.