PHP Class CakeDC\Users\Email\EmailSender

Inheritance: use trait Cake\Mailer\MailerAwareTrait
Datei anzeigen Open project: cakedc/users

Public Methods

Method Description
sendResetPasswordEmail ( Cake\Datasource\EntityInterface $user, Cake\Mailer\Email $email = null, string $template = 'CakeDC/Users.reset_password' ) : array Send the reset password email
sendSocialValidationEmail ( Cake\Datasource\EntityInterface $socialAccount, Cake\Datasource\EntityInterface $user, Cake\Mailer\Email $email = null ) : mixed Send social validation email to the user
sendValidationEmail ( Cake\Datasource\EntityInterface $user, Cake\Mailer\Email $email = null ) : void Send validation email

Protected Methods

Method Description
_getEmailInstance ( Cake\Mailer\Email $email = null ) : Cake\Mailer\Email Get or initialize the email instance. Used for mocking.

Method Details

_getEmailInstance() protected method

Get or initialize the email instance. Used for mocking.
protected _getEmailInstance ( Cake\Mailer\Email $email = null ) : Cake\Mailer\Email
$email Cake\Mailer\Email if email provided, we'll use the instance instead of creating a new one
return Cake\Mailer\Email

sendResetPasswordEmail() public method

Send the reset password email
public sendResetPasswordEmail ( Cake\Datasource\EntityInterface $user, Cake\Mailer\Email $email = null, string $template = 'CakeDC/Users.reset_password' ) : array
$user Cake\Datasource\EntityInterface User entity
$email Cake\Mailer\Email instance, if null the default email configuration with the
$template string email template Users.validation template will be used, so set a ->template() if you pass an Email instance
return array email send result

sendSocialValidationEmail() public method

Send social validation email to the user
public sendSocialValidationEmail ( Cake\Datasource\EntityInterface $socialAccount, Cake\Datasource\EntityInterface $user, Cake\Mailer\Email $email = null ) : mixed
$socialAccount Cake\Datasource\EntityInterface social account
$user Cake\Datasource\EntityInterface user
$email Cake\Mailer\Email Email instance or null to use 'default' configuration
return mixed

sendValidationEmail() public method

Send validation email
public sendValidationEmail ( Cake\Datasource\EntityInterface $user, Cake\Mailer\Email $email = null ) : void
$user Cake\Datasource\EntityInterface User entity
$email Cake\Mailer\Email instance, if null the default email configuration with the
return void