Mail::send not working in lumen I am getting this error
Unable to resolve NULL driver for [Illuminate\Mail\TransportManager]. on Manager.php on line 62.
i followed this link
https://laravel.com/docs/5.7/mail
here is my env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
[email protected]
MAIL_PASSWORD=Abc@12345
MAIL_ENCRYPTION=tls
@BOBBYBOUWMANN - Yes i followed https://lumen.laravel.com/docs/5.7/mail step by step. Nothing missing. Still i am getting this error, here is my bootstrap/app.php code
$app->withFacades();
$app->withEloquent();
$app->register(\Illuminate\Mail\MailServiceProvider::class);
$app->configure('services');
$app->configure('mail');
$app->alias('mailer', Illuminate\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
Everything looks correct. Also make sure that you perform the configure calls at the end of app.php. That is sometimes the problem
// All other stuff
$app->configure('services');
$app->configure('mail');
@BOBBYBOUWMANN - Hi,
I already tried these lines as well
$app->configure('services');
$app->configure('mail');
BUT not luck..
Any other solution or option??
Do you have an mail.php config file?
@WILLIAMXSP - Yes and all is updated as well.
Is there anyother issue??
Just a try, remove these lines:
$app->alias('mailer', Illuminate\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\Mailer::class);
$app->alias('mailer', Illuminate\Contracts\Mail\MailQueue::class);
No clue. Is the illuminate/mail package installed at all?
composer install illuminate/mail
@BOBBYBOUWMANN - Yes, This was done at first step. composer update as well but no luck
Mmh no clue. Do you have your project on github? Maybe we can look into it that way? It can be anything at this point
Aah I see the problem! You didn't create a config/mail.php file in your project!
It's definitely in the documentation!!
Next, configure your mail options by copying the mail.php configuration file from the full Laravel framework to the config directory in the root of your project. Of course, you are free to adjust the configuration options as needed. If your Lumen application does not contain a config directory, you should create it.
After that everything was running on my machine!
Aah, mail.php path was app/config/mail.php, it should be at the root.
Please sign in or create an account to participate in this conversation.