Ejemplo n.º 1
0
 private function sendMail()
 {
     $mailTransport = new MailTransport('mail');
     $mail = new Mail($mailTransport->conf());
     $mail->setSubject('Registration successful')->setFrom($mail->getAdminEmail())->setTo($this->email)->setBody("Welcome {$this->login} on {$this->view->getSiteTitle()}.\n" . "Thank you for registering at our site. You can find your credentials below:\n" . "Login: {$this->login}\nPassword: {$this->password}\nEmail: {$this->email}");
     $mail->send();
 }
Ejemplo n.º 2
0
 /**
  *
  * @param Command $command
  */
 private function sendMail(Command $command)
 {
     $login = $command->entity()->getLogin();
     $transport = new MailTransport('mail');
     $mail = new Mail($transport->conf());
     $mail->setSubject('Remind password')->setFrom($mail->getAdminEmail())->setTo($this->http->request->get('userEmail'))->setBody("Dear {$login}\n" . "Your new password is: {$this->randomPassword}\n" . "You can change it later in your user account.");
     $mail->send();
 }