當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。