当前位置: 首页>>代码示例>>PHP>>正文


PHP Mailer::queueOn方法代码示例

本文整理汇总了PHP中Illuminate\Contracts\Mail\Mailer::queueOn方法的典型用法代码示例。如果您正苦于以下问题:PHP Mailer::queueOn方法的具体用法?PHP Mailer::queueOn怎么用?PHP Mailer::queueOn使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Illuminate\Contracts\Mail\Mailer的用法示例。


在下文中一共展示了Mailer::queueOn方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: emailQueueOnVerificationLink

 /**
  * Prepare and push a job onto the given queue to send the e-mail with the verification token link.
  *
  * @param  string  $queue
  * @param  \Illuminate\Contracts\Auth\Authenticatable  $user
  * @param  string  $subject
  * @param  string  $from
  * @param  string  $name
  * @return mixed
  */
 protected function emailQueueOnVerificationLink($queue, AuthenticatableContract $user, $subject, $from = null, $name = null)
 {
     return $this->mailer->queueOn($queue, $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));
     });
 }
开发者ID:jrean,项目名称:laravel-user-verification,代码行数:21,代码来源:UserVerification.php

示例2: send

 /**
  * send email
  *
  * @param bool $queue
  * @return bool
  */
 public final function send($queue = true)
 {
     //php cannot 'use' this variables yet
     $name = $this->name;
     $email = $this->email;
     $subject = $this->subject;
     $attachments = $this->attachments;
     //data
     $data = array_merge($this->defaultData, $this->data);
     //queue email
     if ($queue) {
         $this->mailer->queueOn('email', $this->view, $data, function ($message) use($name, $email, $subject, $attachments) {
             //set recipient
             $message->to($email, $name);
             //set subject
             $message->subject($subject);
             //set attachments
             foreach ($attachments as $attachment) {
                 $message->attach($attachment);
             }
         });
     } else {
         $this->mailer->send($this->view, $data, function ($message) use($name, $email, $subject, $attachments) {
             //set recipient
             $message->to($email, $name);
             //set subject
             $message->subject($subject);
             //set attachments
             foreach ($attachments as $attachment) {
                 $message->attach($attachment);
             }
         });
     }
     //make sure to clear out recipient info, so we don't accidentally send multiple times to same person
     $this->name = null;
     $this->email = null;
 }
开发者ID:browner12,项目名称:mailer,代码行数:43,代码来源:Mailer.php

示例3: queueOn

 /**
  * @param $queue
  * @param $view
  * @param $data
  *
  * @return mixed
  */
 public function queueOn($queue, $view, $data)
 {
     return $this->mailer->queueOn($queue, $view, $data, $this->callback($data));
 }
开发者ID:draperstudio,项目名称:laravel-mail,代码行数:11,代码来源:Mailer.php


注:本文中的Illuminate\Contracts\Mail\Mailer::queueOn方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。