0

I am having some troubles with Laravel 5.8 and sending the Mail into the logs for testing purposes.

Regular log level INFO gets written to the daily log without any trouble.

What am I missing in my current config?

.ENV file has :

MAIL_DRIVER=log
BROADCAST_DRIVER=log
CACHE_DRIVER=file
QUEUE_CONNECTION=sync
LOG_CHANNEL=stack

Mail.php

'driver' => env('MAIL_DRIVER', 'smtp'), 'log_channel' => env('MAIL_LOG_CHANNEL'),

Logging.php

 'default' => env('LOG_CHANNEL', 'stack'),
'stack' => [
            'driver' => 'stack',
            'channels' => ['daily'],
        ],
2
  • Your code seems correct, did you forget to run artisan config:cache? Commented May 14, 2019 at 2:18
  • The clear config:cache? Sure did, I’m totally stumped Commented May 14, 2019 at 2:26

3 Answers 3

1

Laravel :

Basically if you change or add any config, you must need to run clear:config or config:cache like below:

Run php artisan config:cache on terminal of project directory.

Sign up to request clarification or add additional context in comments.

1 Comment

Not sure if it changed, but in Laravel 7 it's config:clear
0

I am using Laravel Telescope and it works great. It has a Mail page which shows you all rendered emails. No need to send mail to log to debug. Matt Stauffer has a detailed go through of Telescope

Comments

0

If you are using Laravel version 7 or greater, the .env file variable has changed:

VERSIONS <=6: MAIL_DRIVER=log
VERSIONS >=7: MAIL_MAILER=log

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.