本文整理匯總了PHP中Illuminate\Contracts\Mail\Mailer::laterOn方法的典型用法代碼示例。如果您正苦於以下問題:PHP Mailer::laterOn方法的具體用法?PHP Mailer::laterOn怎麽用?PHP Mailer::laterOn使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Illuminate\Contracts\Mail\Mailer
的用法示例。
在下文中一共展示了Mailer::laterOn方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: emailLaterOnVerificationLink
/**
* Prepare and send later on the given queue 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 emailLaterOnVerificationLink($queue, $seconds, AuthenticatableContract $user, $subject, $from = null, $name = null)
{
return $this->mailer->laterOn($queue, $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));
});
}
示例2: deliver
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);
}