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


PHP Mailer::queue方法代码示例

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


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

示例1: send

 /**
  * 發送Email
  *
  * @param array $request
  */
 public function send(array $request)
 {
     $this->mail->queue('email.index', $request, function (Message $message) {
         $message->send(env('MAIL_USERNAME'));
         $message->subject(env('MAIL_SUBJECT'));
         $message->to(env('MAIL_TO_ADDR'));
     });
 }
开发者ID:oomusou,项目名称:Laravel51ServiceExternal_demo,代码行数:13,代码来源:EmailService.php

示例2: sendTo

 /**
  * Send an email.
  *
  * @param Traversable|string $email
  * @param $subject
  * @param $view
  * @param $data
  */
 public function sendTo($email, $subject, $view, $data = [])
 {
     if (!$email instanceof Traversable) {
         $email = [$email];
     }
     foreach ($email as $singleEmailAddress) {
         $this->mail->queue($view, $data, function ($message) use($singleEmailAddress, $subject) {
             $message->to($singleEmailAddress)->subject($subject);
         });
     }
 }
开发者ID:bjrnblm,项目名称:blender,代码行数:19,代码来源:Mailer.php

示例3: sendTo

 public function sendTo($user, $subject, $view, $data = [])
 {
     $this->mail->queue($view, $data, function ($message) use($user, $subject) {
         $message->subject($subject);
         if (is_object($user)) {
             $message->to($user->email, $user->name);
         } else {
             $message->to($user);
         }
     });
 }
开发者ID:phil-stephens,项目名称:usenimbus,代码行数:11,代码来源:Mailer.php

示例4: sendEmail

 /**
  * Send an email to the conversation owner.
  *
  * @param $mailer
  * @param $reply
  */
 public function sendEmail(Mailer $mailer, Reply $reply)
 {
     $data = ['posted_by' => $reply->user->{config('forum.user.username')}, 'link' => route('forum.conversation.show', $reply->conversation->slug)];
     $mailer->queue('Forum::Emails.template', ['data' => $data], function ($message) use($reply) {
         $message->from(config('forum.emails.from'), config('forum.emails.from-name'));
         $message->to($reply->user->email, $reply->user->{config('forum.user.username')})->subject(config('forum.emails.subject'));
     });
 }
开发者ID:elNapoli,项目名称:iCnca7CrTNYXRF4oxPSidusv17MoVk7CEAhNGFGcYHSu0DNSy7Hkq,代码行数:14,代码来源:PostReply.php

示例5: send

 /**
  * Send message.
  *
  * @param       $view
  * @param array $data
  * @param       $mailingList
  * @param null  $attachement
  *
  * @return bool
  */
 public function send($view, $data = [], $mailingList, $attachement = null)
 {
     $config = App::make(Config::class);
     $emailParams = $config->get('These.admin.email');
     // If the file size is bigger than 20 Mo do not attach the file
     if (is_null($attachement) || filesize($attachement) > 20000000) {
         $attachement = false;
     }
     $this->mail->queue($view, $data, function ($message) use($mailingList, $attachement, $emailParams) {
         $message->from($emailParams['from'], $emailParams['name']);
         $message->subject('Administration de Thèse ALR');
         $message->to($mailingList);
         if ($attachement) {
             $message->attach($attachement);
         }
     });
     return true;
 }
开发者ID:rleger,项目名称:TheseEcho,代码行数:28,代码来源:SendAdminMessageToUser.php

示例6: queue

 /**
  * Queue a new e-mail message for sending.
  *
  * @param string|array $view
  * @param array $data
  * @param \Closure|string $callback
  * @param string|null $queue
  * @return mixed 
  * @static 
  */
 public static function queue($view, $data, $callback, $queue = null)
 {
     return \Illuminate\Mail\Mailer::queue($view, $data, $callback, $queue);
 }
开发者ID:satriashp,项目名称:tour,代码行数:14,代码来源:_ide_helper.php

示例7: sendTo

 /**
  * sendTo
  *
  * @param $user
  * @param $subject
  * @param $view
  * @param $data
  *
  * @return mixed
  * @author Alonzo Tolver <alonzotolver@gmail.com>
  *
  **/
 public function sendTo($user, $subject, $view, $data = [])
 {
     $this->mail->queue($view, $data, function ($message) use($user, $subject) {
         $message->to($user->email)->subject($subject);
     });
 }
开发者ID:atolver,项目名称:larabook,代码行数:18,代码来源:Mailer.php

示例8: sendTo

 /**
  * @param \HorseStories\Models\Users\User $user
  * @param string $subject
  * @param string $view
  * @param array $data
  */
 public function sendTo(User $user, $subject, $view, $data = [])
 {
     $this->mail->queue($view, $data, function ($message) use($user, $subject) {
         $message->to('test@test.com')->subject($subject);
     });
 }
开发者ID:studiocaro,项目名称:HorseStories,代码行数:12,代码来源:Mailer.php

示例9: queue

 /**
  * Queue a new e-mail message for sending.
  *
  * @param  string  $queue
  * @return int
  */
 public function queue($queue = null)
 {
     return $this->mailer->queue($this->view, $this->data, $this->prepareCallback(), $queue);
 }
开发者ID:mycrazydog,项目名称:mm-shibboleth,代码行数:10,代码来源:Mailer.php


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