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


PHP Mailer::raw方法代码示例

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


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

示例1: handle

 /**
  * Execute the console command.
  *
  * @return mixed
  */
 public function handle()
 {
     $books = Book::with('user')->where('taken_at', '<', date('Y-m-d H:i:s', time() - 2592000))->get();
     /** @var Book[] $books */
     foreach ($books as $book) {
         $this->mailer->raw(sprintf("Hi %s,\nPlease return back %s by %s.\nRegards,\nYour Library", $book->user->first_name, $book->title, $book->author), function ($message) use($book) {
             $message->subject('Reminder');
             $message->from(getenv('EMAIL_FROM'));
             $message->to($book->user->email);
         });
     }
 }
开发者ID:rtyshyk,项目名称:binary-studio-library-task,代码行数:17,代码来源:ReturnBookRemind.php

示例2: handle

 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $message_text = "Hello, {$this->user->firstname}, you should return the book, since 30 days have passed from the time when you took the book '{$this->book->title}'";
     $mailer->raw($message_text, function ($message) {
         $message->subject('Return your book');
         $message->from('reminder@example.com', 'Reminder');
         $message->to($this->user->email);
     });
 }
开发者ID:a1ex7,项目名称:librauth,代码行数:14,代码来源:SendReminderEmail.php

示例3: handle

 /**
  * Execute the command.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $users = User::all();
     $message_text = "Hello, new book was add to our library: '{$this->book->title}' by {$this->book->author}";
     foreach ($users as $user) {
         $mailer->raw($message_text, function ($message) use($user) {
             $message->subject('New book add to the library');
             $message->from('no-reply@example.com', 'Admin');
             $message->to($user->email);
         });
     }
 }
开发者ID:a1ex7,项目名称:librauth,代码行数:17,代码来源:SendAddNewBookEmail.php

示例4: handle

 /**
  * Execute the job.
  *
  * @return void
  */
 public function handle(Mailer $mailer)
 {
     $users = Model\User::all(['first_name']);
     /** @var Model\User[] $users */
     foreach ($users as $user) {
         $mailer->raw(sprintf("Hi %s,\nWe have a new book %s by %s.\nRegards,\nYour Library", $user->first_name, $this->book->title, $this->book->author), function ($message) use($user) {
             $message->subject('Brand new book');
             $message->from(getenv('EMAIL_FROM'));
             $message->to($user->email);
         });
     }
 }
开发者ID:rtyshyk,项目名称:binary-studio-library-task,代码行数:17,代码来源:SendNewBookEmail.php

示例5: raw

 /**
  * Send a new message when only a raw text part.
  *
  * @param string $text
  * @param mixed $callback
  * @return int 
  * @static 
  */
 public static function raw($text, $callback)
 {
     return \Illuminate\Mail\Mailer::raw($text, $callback);
 }
开发者ID:satriashp,项目名称:tour,代码行数:12,代码来源:_ide_helper.php

示例6: send

 /**
  * Send a template email.
  *
  * @param $template
  * @param $data
  * @return bool
  */
 public function send($template, $data)
 {
     return $this->mailer->raw($template, $data);
 }
开发者ID:visualturk,项目名称:templates-module,代码行数:11,代码来源:TemplateMailer.php

示例7: raw

 /**
  * Send a new message when only a raw text part.
  *
  * @param string $text
  * @param \Closure|string $callback
  * @return int
  */
 public function raw($text, $callback)
 {
     return $this->mailer->raw($text, $callback);
 }
开发者ID:jaffle-be,项目名称:framework,代码行数:11,代码来源:ThemeMailer.php


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