\Cake\MailerMailerAwareTrait

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.

Summary

Methods
Properties
Constants
No public methods found
No public properties found
No constants found
getMailer()
No protected properties found
N/A
No private methods found
No private properties found
N/A

Methods

getMailer()

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

Email instance.

Throws

\Cake\Mailer\Exception\MissingMailerException

if undefined mailer class.

Returns

\Cake\Mailer\Mailer