Support the ongoing development of →
Mail Forms Database
Last updated 2 weeks ago.

What seems to be the problem ?


I get this error when i try to send the mail

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

#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

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'] ?


Sign in to participate in this thread!

Full Stack Europe

Your banner here too?


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 - All rights reserved.