Support the ongoing development of Laravel.io →
Mail Forms Database
Last updated 2 weeks 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

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

Sign in to participate in this thread!

Full Stack Europe

Your banner here too?

Moderators

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

Your logo here?

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

© 2022 Laravel.io - All rights reserved.