【问题标题】:Lumen mail driver is null issueLumen 邮件驱动程序为空问题
【发布时间】: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].

【问题讨论】:

    标签: laravel email smtp lumen


    【解决方案1】:

    问题。您需要为邮件添加配置文件。 (config/mail.php)

        Just Copy Laravel mail.php config file to lumen root_dir/config/mail.php
    

    参考THIS LINK

    【讨论】:

      猜你喜欢
      • 2015-06-19
      • 2019-06-19
      • 2012-04-02
      • 2012-03-10
      • 1970-01-01
      • 1970-01-01
      • 2017-09-11
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多