【问题标题】:Lumen email attachment weird behavior流明电子邮件附件奇怪的行为
【发布时间】:2017-04-09 03:55:00
【问题描述】:

每当我尝试使用 lumen 发送邮件时,我都会收到此错误(等待后): 超过 30 秒的最长执行时间。

每当我尝试执行时都会弹出这个奇怪的错误

    $mailer = app()->make('mailer');
    $mailer->send('template', [] , function ($message) use ($file) {

        $message->from('test@example.com', 'test');
        $message->to('test@example.com');
        // $message->attach($file, ['mime' => 'pdf']); <-- problem

    });

但是,此代码按预期工作。 每当我取消注释 $message->attach 行时,页面将不再加载。

不,PDF 不是特别少,我无法跟踪问题... 有人有想法吗?

【问题讨论】:

    标签: php laravel email lumen


    【解决方案1】:

    显然它是在谷歌方面。 我使用了谷歌的 smtp 服务器。 当我将文件添加为附件时,似乎服务器阻止了我的请求。 仍然不知道为什么,但它现在有效! (使用邮枪)。

    【讨论】:

      猜你喜欢
      • 2011-01-02
      • 1970-01-01
      • 2019-02-19
      • 2017-05-09
      • 2013-04-18
      • 1970-01-01
      • 2011-12-26
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多