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


PHP Mail::queueOn方法代码示例

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


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

示例1: register

 public function register(Form $form)
 {
     $auth = Auth::customer();
     $request = $form->request->all();
     if (!$auth->findByEmail($request['email'])) {
         $auth->register($request);
         $user = $auth->findByEmail($request['email']);
         if ($user->id) {
             if (config('store.signup_email')) {
                 Mail::queueOn('default', config('store.email_account_confirmation'), compact('user'), function ($message) use($user) {
                     $message->to($user->email)->subject(trans('account.email.confirmation.subject'));
                 });
                 Message::addSuccess(trans('account.alerts.instructions_sent'));
             } else {
                 Message::addSuccess(trans('account.alerts.account_created'));
             }
         } else {
             foreach ($user->errors()->all(':message') as $error) {
                 Message::addError($error);
             }
         }
     } else {
         Message::addError(trans('account.alerts.duplicated_credentials'));
     }
 }
开发者ID:BryceHappy,项目名称:lavender,代码行数:25,代码来源:AuthHandler.php

示例2: handle

 /**
  * Handle the event.
  *
  * @param EmailChangeRequested $event
  */
 public function handle(EmailChangeRequested $event)
 {
     $user = $event->user;
     $data = ['email' => $user->email, 'name' => $user->name, 'token' => $user->requestEmailToken()];
     Mail::queueOn('deployer-low', 'emails.change_email', $data, function (Message $message) use($user) {
         $message->to($user->email, $user->name)->subject(Lang::get('emails.confirm_email'));
     });
 }
开发者ID:rebelinblue,项目名称:deployer,代码行数:13,代码来源:EmailChangeConfirmation.php

示例3: sendEmail

 private function sendEmail($user, $subject, $view, $data, $queue)
 {
     Mail::queueOn($queue, $view, $data, function ($message) use($user, $subject) {
         $message->from(Config::get('mail.from.address'), Config::get('mail.from.name'));
         $message->to($user->email)->subject($subject);
     });
     Email::create(['user_id' => $user->user_id, 'subject' => $subject, 'body' => view($view)->with($data)->render(), 'status' => EmailStatus::Sent, 'sent_at' => Carbon::now()]);
 }
开发者ID:RoryStolzenberg,项目名称:spacexstats,代码行数:8,代码来源:Mailer.php

示例4: handle

 /**
  * Handle the event.
  *
  * @param UserWasCreated $event
  */
 public function handle(UserWasCreated $event)
 {
     $user = $event->user;
     $data = ['password' => $event->password, 'email' => $user->email];
     Mail::queueOn('deployer-low', 'emails.account', $data, function (Message $message) use($user) {
         $message->to($user->email, $user->name)->subject(Lang::get('emails.creation_subject'));
     });
 }
开发者ID:rebelinblue,项目名称:deployer,代码行数:13,代码来源:SendSignupEmail.php

示例5: handle

 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle()
 {
     $emails = $this->project->notifyEmails;
     if ($emails->count() > 0) {
         $status = strtolower($this->project->getPresenter()->readable_status);
         $subject = Lang::get('notifyEmails.subject', ['status' => $status, 'project' => $this->project->name]);
         $deploymentArr = $this->deployment->toArray();
         $deploymentArr['commitURL'] = $this->deployment->commit_url;
         $deploymentArr['shortCommit'] = $this->deployment->short_commit;
         $data = ['project' => $this->project->toArray(), 'deployment' => $deploymentArr];
         Mail::queueOn('deployer-low', 'emails.deployed', $data, function (Message $message) use($emails, $subject) {
             foreach ($emails as $email) {
                 $message->to($email->email, $email->name);
             }
             $message->subject($subject);
         });
     }
 }
开发者ID:devLopez,项目名称:deployer-1,代码行数:23,代码来源:MailDeployNotification.php

示例6: signup

 /**
  * Create a new user
  * @return Illuminate\Support\Facades\Redirect
  */
 public function signup()
 {
     $input = Input::all();
     $v = Validator::make($input, array_merge(User::$rules, ['ign' => 'regex:/^([a-zA-Z0-9_\\-]+)$/']));
     if ($v->fails()) {
         return Redirect::route('user.register')->withInput(Input::except('password', 'password_confirmation'))->withErrors($v);
     }
     $user = $this->repository->signup($input);
     if (is_null($user->id)) {
         return Redirect::route('user.register')->withInput(Input::except('password', 'password_confirmation'))->withErrors($user->errors());
     }
     if (Config::get('confide::signup_email')) {
         Mail::queueOn(Config::get('confide::email_queue'), 'emails.user.signup', compact('user'), function ($message) use($user) {
             $message->to($user->email, $user->username)->subject(Lang::get('confide::confide.email.account_confirmation.subject'));
         });
     }
     return Redirect::route('user.login')->with('messages', [Lang::get('confide::confide.alerts.account_created')]);
 }
开发者ID:R3alflash,项目名称:BFAdminCP,代码行数:22,代码来源:UsersController.php

示例7: mailSend

 /**
  * Ставим отправку почты в очередь 'subscribe'
  * @param $sSendTo
  * @param null $sTitle
  * @param null $sPreview
  * @param null $sLink
  */
 public function mailSend($sSendTo, $sTemplate, $arData)
 {
     Mail::queueOn('subscribe', $sTemplate, $arData, function ($message) use($sSendTo) {
         $message->to($sSendTo);
     });
 }
开发者ID:lovata,项目名称:you-ve-got-mail,代码行数:13,代码来源:Mailings.php


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