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


PHP Mailer::raw方法代码示例

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


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

示例1: handle

 /**
  * @param RequestPasswordReset $command
  * @return \Flarum\Core\User
  * @throws ModelNotFoundException
  */
 public function handle(RequestPasswordReset $command)
 {
     $user = $this->users->findByEmail($command->email);
     if (!$user) {
         throw new ModelNotFoundException();
     }
     $token = PasswordToken::generate($user->id);
     $token->save();
     $data = ['{username}' => $user->username, '{url}' => $this->url->toRoute('resetPassword', ['token' => $token->id]), '{forum}' => $this->settings->get('forum_title')];
     $body = $this->translator->trans('core.email.reset_password.body', $data);
     $this->mailer->raw($body, function (Message $message) use($user, $data) {
         $message->to($user->email);
         $message->subject('[' . $data['{forum}'] . '] ' . $this->translator->trans('core.email.reset_password.subject'));
     });
     return $user;
 }
开发者ID:clops,项目名称:core,代码行数:21,代码来源:RequestPasswordResetHandler.php

示例2: handle

 /**
  * Execute the job.
  *
  * @param  Mailer  $mailer
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $mailer->raw('You have received a new purchase of ' . $this->receipt->product->credits . ' credits for ' . $this->receipt->price, function ($message) {
         $message->from('billing@whatscarrier.com', 'Whatscarrier');
         $message->subject('You have received new purchase')->to('mohd.sulaiman@sudirman.info');
     });
 }
开发者ID:natsu90,项目名称:whatscarrier-api,代码行数:13,代码来源:SendPurchaseEmail.php

示例3: handle

 /**
  * {@inheritdoc}
  */
 public function handle(ServerRequestInterface $request)
 {
     $id = array_get($request->getQueryParams(), 'id');
     $actor = $request->getAttribute('actor');
     $this->assertRegistered($actor);
     if ($actor->id != $id || $actor->is_activated) {
         throw new PermissionDeniedException();
     }
     $token = EmailToken::generate($actor->email, $actor->id);
     $token->save();
     $data = ['{username}' => $actor->username, '{url}' => $this->url->toRoute('confirmEmail', ['token' => $token->id]), '{forum}' => $this->settings->get('forum_title')];
     $body = $this->translator->trans('core.email.activate_account.body', $data);
     $this->mailer->raw($body, function (Message $message) use($actor, $data) {
         $message->to($actor->email);
         $message->subject('[' . $data['{forum}'] . '] ' . $this->translator->trans('core.email.activate_account.subject'));
     });
     return new EmptyResponse();
 }
开发者ID:Luceos,项目名称:core,代码行数:21,代码来源:SendConfirmationEmailController.php

示例4: whenUserEmailChangeWasRequested

 /**
  * @param \Flarum\Event\UserEmailChangeWasRequested $event
  */
 public function whenUserEmailChangeWasRequested(UserEmailChangeWasRequested $event)
 {
     $email = $event->email;
     $data = $this->getEmailData($event->user, $email);
     $body = $this->translator->trans('core.email.confirm_email.body', $data);
     $this->mailer->raw($body, function (Message $message) use($email, $data) {
         $message->to($email);
         $message->subject('[' . $data['{forum}'] . '] ' . $this->translator->trans('core.email.confirm_email.subject'));
     });
 }
开发者ID:asifalimd,项目名称:core,代码行数:13,代码来源:EmailConfirmationMailer.php

示例5: emailOutput

 /**
  * E-mail the output of the event to the recipients.
  *
  * @param  \Illuminate\Contracts\Mail\Mailer  $mailer
  * @param  array  $addresses
  * @param  bool  $onlyIfOutputExists
  * @return void
  */
 protected function emailOutput(Mailer $mailer, $addresses, $onlyIfOutputExists = false)
 {
     $text = file_get_contents($this->output);
     if ($onlyIfOutputExists && empty($text)) {
         return;
     }
     $mailer->raw($text, function ($m) use($addresses) {
         $m->subject($this->getEmailSubject());
         foreach ($addresses as $address) {
             $m->to($address);
         }
     });
 }
开发者ID:rosswilson252,项目名称:framework,代码行数:21,代码来源:Event.php

示例6: emailOutput

 /**
  * E-mail the output of the event to the recipients.
  *
  * @param  \Illuminate\Contracts\Mail\Mailer  $mailer
  * @param  array  $addresses
  * @return void
  */
 protected function emailOutput(Mailer $mailer, $addresses)
 {
     $mailer->raw(file_get_contents($this->output), function ($m) use($addresses) {
         $m->subject($this->getEmailSubject());
         foreach ($addresses as $address) {
             $m->to($address);
         }
     });
 }
开发者ID:EnmanuelCode,项目名称:backend-laravel,代码行数:16,代码来源:Event.php

示例7: handle

 /**
  * 受け取ったイベントをメールで送信する
  */
 public function handle(HubConnectionBaseEvent $event)
 {
     $this->mailer->raw($event, function ($m) {
         $m->to('my@example.com', '自分')->subject('Hubサイトのメール通知');
     });
 }
开发者ID:HiroKws,项目名称:zakkuto-laravel-hub-site,代码行数:9,代码来源:MailSender.php

示例8: send

 public function send()
 {
     $this->mailer->raw($this->message, function (Message $message) {
         $message->subject($this->subject)->from($this->config['from'])->to($this->config['to']);
     });
 }
开发者ID:ericmakesstuff,项目名称:laravel-server-monitor,代码行数:6,代码来源:Mail.php

示例9: sendRaw

 /**
  * Send raw message
  *
  * @param $text
  * @param $subject
  * @param $to
  */
 public function sendRaw($text, $subject, $to)
 {
     $this->mailer->raw($text, function ($message) use($subject, $to) {
         $message->to($to)->subject($subject);
     });
 }
开发者ID:vjaykoogu,项目名称:smile-media-laravel,代码行数:13,代码来源:Mailer.php


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