我正在跟踪此链接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].
答案 0 :(得分:0)
问题。您需要为邮件添加配置文件。 (config / mail.php)
Just Copy Laravel mail.php config file to lumen root_dir/config/mail.php