예제 #1
0
 /**
  * Handle the command.
  *
  * @param Mailer                     $mailer
  * @param SettingRepositoryInterface $settings
  * @return mixed
  */
 public function handle(Mailer $mailer, SettingRepositoryInterface $settings)
 {
     $path = $this->dispatch(new GetResetPasswordPath($this->user, $this->redirect));
     return $mailer->send('anomaly.module.users::emails/reset', ['user' => $this->user, 'path' => $path], function (Message $message) use($settings) {
         $message->subject('Reset your password')->to($this->user->getEmail(), $this->user->getDisplayName())->from($settings->value('streams::server_email', 'noreply@localhost'));
     });
 }
예제 #2
0
 /**
  * Handle the command.
  *
  * @param Mailer     $mailer
  * @param Repository $config
  * @return bool
  */
 public function handle(Mailer $mailer, Repository $config)
 {
     $path = $this->dispatch(new GetResetPasswordPath($this->user, $this->redirect));
     $mailer->send('anomaly.module.users::message/reset', compact('user', 'path'), function (Message $message) use($config) {
         $message->subject('Reset your password')->to($this->user->getEmail(), $this->user->getDisplayName())->from($config->get('mail.from.address', 'noreply@localhost'));
     });
     return empty($mailer->failures());
 }