Lumen 邮件驱动程序为空问题
Posted
技术标签:
【中文标题】Lumen 邮件驱动程序为空问题【英文标题】:Lumen mail driver is null issue 【发布时间】:2019-06-10 14:17:03 【问题描述】:我正在关注此链接https://lumen.laravel.com/docs/5.7/mail
这是我的 bootstrap/app.php 代码
$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);
我也运行下面的代码
composer require illuminate/mail
composer update
这是我的 .env
MAIL_DRIVER=smtp
MAIL_HOST=smtp.gmail.com
MAIL_PORT=587
MAIL_USERNAME=abc@gmail.com
MAIL_PASSWORD=Abc@12345
MAIL_ENCRYPTION=tls
我安装了新的流明,我确信我没有错过任何东西。
我收到了这个错误
Unable to resolve NULL driver for [Illuminate\Mail\TransportManager].
【问题讨论】:
【参考方案1】:问题。您需要为邮件添加配置文件。 (config/mail.php)
Just Copy Laravel mail.php config file to lumen root_dir/config/mail.php
参考THIS LINK
【讨论】:
以上是关于Lumen 邮件驱动程序为空问题的主要内容,如果未能解决你的问题,请参考以下文章