Thursday, April 13, 2017

Cannot send a notification email in Lumen

I'm trying to send a notification email as follows:

$post= Post::findOrFail($id);

$user = new User(['email' => 'report@myapp.com']);

$user->notify(new ReportPost($post));

But this isn't working for some reason. No error, but I'm not receiving any email. But if I fetch a user from the database and try the same thing, it will work. Any idea?

I'm using Lumen 5.3 and I've included the Mail and Notification package from Laravel 5.3



via user1012181

Advertisement