Right. Now assuming your the same guy I was helping earlier in IRC. I got the same error as you and I fixed it.
Here are the steps I took: (Step 4 is the most important).
1) Install Lumen:
lumen new service
2) Include the Mail libs:
composer require illuminate\mail
3) add test mail call to the provided '/' route in route.php
Mail::raw('Raw string email', function($msg) { $msg->to(['[email protected]']); $msg->from(['[email protected]']); });
4) uncomment lines in bootstrap/app.php
line 81 and line 22 need to be uncommented.
$app->register('App\Providers\AppServiceProvider');
to access the Mail ServiceProvider.
$app->withFacades();
to access the Mail facade.
This should work now, provided the correct settings are provided for the email provider (username, port, host etc) No more errors. :)
Where to put the email setting? (username, password, port, etc.) Is it on .env? Assuming i want to use the Mail in my Controller. How can i import or use the Mail Class? Is the code below correct?
use Mail;
nicekiwi said:
2) Include the Mail libs:
composer require illuminate\mail
It should be: composer require illuminate/mail
("/" instead of "").
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community