Laravel mail pretend prints nothing

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

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


    
E-mail: {{
5条回答
  •  小鲜肉
    小鲜肉 (楼主)
    2021-02-01 16:57

    If you set 'pretend' => true in app/config/mail.php then no mail is ever sent, you get just a message in the log, like this:

    [2014-07-17 14:15:07] production.INFO:
        Pretending to mail message to: foo@example.com [] []
    

    However, if you leave 'pretend' => false and instead use the log driver ('driver' => 'log', available since Laravel 4.2), then instead of sending the mail, you'll get the whole mail content written into the log:

    [2014-07-17 14:15:14] production.DEBUG:
        Message-ID: 
    
    Date: Thu, 17 Jul 2014 14:15:15 +0000
    
    Subject: Welcome!
    From: Ahmad 
    To: John Smith 
    MIME-Version: 1.0
    Content-Type: text/html; charset=utf-8
    Content-Transfer-Encoding: quoted-printable
    
    
        Order confirmed!
    
     [] []
    

提交回复
热议问题