/** * Prepare and send later the e-mail with the verification token link. * * @param int $seconds * @param \Illuminate\Contracts\Auth\Authenticatable $user * @param string $subject * @param string $from * @param string $name * @return mixed */ protected function emailLaterVerificationLink($seconds, AuthenticatableContract $user, $subject, $from = null, $name = null) { return $this->mailer->later($seconds, $this->emailView, compact('user'), function ($m) use($user, $subject, $from, $name) { if (!empty($from)) { $m->from($from, $name); } $m->to($user->email); $m->subject(is_null($subject) ? trans('laravel-user-verification::user-verification.verification_email_subject') : $subject); event(new VerificationEmailSent($user)); }); }
/** * @param $delay * @param $view * @param $data * * @return mixed */ public function later($delay, $view, $data) { return $this->mailer->later($delay, $view, $data, $this->callback($data)); }
public function deliver() { $message = $this->buildMessage(['from' => $this->from, 'to' => $this->to, 'subject' => $this->subject, 'attachments' => $this->attachments]); if (!empty($this->queue)) { if (!empty($this->queueName)) { return $this->mailer->queue($this->queueName, $this->view, $this->data, $message); } return $this->mailer->queue($this->view, $this->data, $message); } if (!empty($this->later)) { if (!empty($this->queueName)) { return $this->mailer->laterOn($this->queueName, $this->later, $this->view, $this->data, $message); } return $this->mailer->later($this->later, $this->view, $this->data, $message); } return $this->mailer->send($this->view, $this->data, $message); }