Support the ongoing development of Laravel.io →
posted 9 years ago
Mail
Last updated 2 years ago.
0

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.

5) profit.

This should work now, provided the correct settings are provided for the email provider (username, port, host etc) No more errors. :)

Last updated 9 years ago.
0

it is work for me thanks nicekiwi

0

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;
0

nicekiwi said:

2) Include the Mail libs:
composer require illuminate\mail

It should be: composer require illuminate/mail

("/" instead of "").

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.