Laravel mail pretend prints nothing

后端 未结 5 508
走了就别回头了
走了就别回头了 2021-02-01 16:48

I set \'pretend\' => true, in the mail.php, created this new.php view:


    
E-mail: {{
5条回答
  •  不要未来只要你来
    2021-02-01 17:15

    I include this in my send callbacks:

    Mail::send(array('emails.html','emails.text'),$data,function($message) use($data)
    {
       //Set $message data
       if(Config::get('mail.pretend')) Log::info(View::make('emails.html',$data)->render());
    }
    

    Alternately, you can pass the views render into another view to see the html rendered in your browser.

提交回复
热议问题