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
-
getMailer() protected
Returns a mailer instance.
Method Detail
getMailer() ΒΆ protected
getMailer(string $name, array<string, mixed>|string|null $config = null): Cake\Mailer\Mailer
Returns a mailer instance.
Parameters
-
string
$name Mailer's name.
-
array<string, mixed>|string|null
$config optional Array of configs, or profile name string.
Returns
Cake\Mailer\Mailer
Throws
Cake\Mailer\Exception\MissingMailerException
if undefined mailer class.