Support the ongoing development of Laravel.io →
Mail Forms Database
Last updated 1 year ago.
0

What seems to be the problem ?

0

I get this error when i try to send the mail


ErrorException thrown with message "Trying to get property 'mail' of non-object"

Stacktrace:
#56 ErrorException in C:\xamppNew\htdocs\laravelapps\procurement\app\Http\Controllers\EmailController.php:37
#55 Illuminate\Foundation\Bootstrap\HandleExceptions:handleError in C:\xamppNew\htdocs\laravelapps\procurement\app\Http\Controllers\EmailController.php:37
#54 App\Http\Controllers\EmailController:sendmail in C:\xamppNew\htdocs\laravelapps\procurement\vendor\laravel\framework\src\Illuminate\Routing\Controller.php:54
...
0
Solution

What happens when you do dump($task) inside the foreach does it have an email property (eg is it an object or an array)? or should you be calling it as $task['mail'] ?

0

Thanks...

0

Sign in to participate in this thread!

Eventy

Your banner here too?

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.