Laravel logging doesn't work on laragon!


  • | 119 points

    Laravel logging doesn't work on laragon?


  • administrators
    | 44080 points

    It should work. Can you describe your case in more details?


  • | 119 points

    I have an app on laravel 4.2. I tryed to use Mail::pretend on development enviroment today which supposed to emulate email sending proccess by logging email info into laravel.log file. I opened it and it seems like it hasn't changed since I moved my project from homestead to laragon 3 months ago.


  • | 119 points

    It works on laravel 5 projects.


  • administrators
    | 44080 points

    Why don't you use Laragon Mail Catcher feature?
    Just change 'driver' to 'mail' and set pretend to false in app\config\mail.php

    return array(
    
    	/*
    	|--------------------------------------------------------------------------
    	| Mail Driver
    	|--------------------------------------------------------------------------
    	|
    	| Laravel supports both SMTP and PHP's "mail" function as drivers for the
    	| sending of e-mail. You may specify which one you're using throughout
    	| your application here. By default, Laravel is setup for SMTP mail.
    	|
    	| Supported: "smtp", "mail", "sendmail", "mailgun", "mandrill", "log"
    	|
    	*/
    
    	'driver' => 'mail',
           ....
           ....
        'pretend' => false, 
           
    
    

    When test sending mail, Laragon will display a small popup on the bottom right of your screen, click on [View email], you can see its content quickly.


    Example:

    Mail::send('emails.auth.reminder', array('token' => '...'), function($message) {
        $message->to('nobody@laragon.org', 'Leo Khoa')->subject('I am Mail Catcher!');
    });
    

    will show a popup like that:
    0_1458834012620_mailcatcher-laravel4.png

    PS: Mail Catcher is only available in Laragon 1.0.6:
    https://forum.laragon.org/topic/67/laragon-1-0-6-release-announcement-with-mail-catcher-mail-sender


  • | 119 points

    First of all, Congratulations! I wish you and your wife all the best. God bless you guys.

    When i use your new feature MailSender it gives me this on php 5.6
    0_1458837546495_300.jpg
    MailCatcher doesn't work either.

    On php 7 it gives just a black screen.

    That's why I was trying to use pretend


  • administrators
    | 44080 points

    Thanks yos-virtus for your kind wish :)
    What you mean MailCatcher doesn't work?
    Can you create a file name testmail.php which use a simple mail php mail function to test

    <?php
    // The message
    $message = "Line 1\r\nLine 2\r\nLine 3";
    
    // In case any of our lines are larger than 70 characters, we should use wordwrap()
    $message = wordwrap($message, 70, "\r\n");
    
    // Send
    mail('caffeinated@example.com', 'My Subject', $message);

  • administrators
    | 44080 points

    For MailSender, are you using a self-signed certificate with openssl? I will update Laragon 1.0.7 to bypass Certificate checking.


Log in to reply
 

Looks like your connection to Laragon was lost, please wait while we try to reconnect.