Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Martal's avatar

@shirshadebnath

A-ha! We are on the trace!

Now we need logger('START',[$address, $name, $property]); at the beginning of the function again.

ShirshaDebnath's avatar

@martal

[2019-12-14 08:29:54] local.DEBUG: START ["kirito.sd307@gmail.com",null,"to"] [2019-12-14 08:29:54] local.DEBUG: START [[],null,"cc"] [2019-12-14 08:29:54] local.DEBUG: START [[],null,"bcc"] [2019-12-14 08:29:54] local.DEBUG: START [null,null,"from"] [2019-12-14 08:29:54] local.ERROR: Trying to get property 'email' of non-object {"userId":1,"exception":"[object] (ErrorException(code: 0): Trying to get property 'email' of non-object at E:\dev\Laravel_projects\soporific_mind\vendor\laravel\framework\src\Illuminate\Mail\Mailable.php:585) [stacktrace]

BTW i only have "1" user in database at present

Martal's avatar

This is the reason of error

[2019-12-14 08:29:54] local.DEBUG: START [null,null,"from"]

What does dd(env('MAIL_FROM_ADDRESS')); says?

Martal's avatar
Martal
Best Answer
Level 31

@shirshadebnath

Did you cache config?

Try to clean it with php artisan config:clear and explore env('MAIL_FROM_ADDRESS') again.

tisuchi's avatar

@shirshadebnath

If it doesn't work after running the command that @martal suggested, then try after restarting (if you use php artisan serve, then just stop and run again) your PHP Server.

It seems that the env variable is not reflecting.

Martal's avatar

@shirshadebnath

It was my pleasure. All my knowledge isn't actually mine, it belongs to the mankind.

Have a nice day and don't forget to update your cache! (=

Previous

Please or to participate in this conversation.