php - Laravel:期待响应 250 但得到 ""消息 ""

标签 php laravel email sendgrid

我继续从 Laravel 收到此错误,但一切看起来都是正确的:

Expecting response 250 but got "" with message ""

根据我的研究,问题发生在通过 Sendgrid(或任何提供商)发送电子邮件并且接收服务器以空白代码响应时。

SendGrid 没有传递空白代码,而是将其翻译成这样; Sendgrid 需要 250(一切正常)代码,但什么也得不到。

我不知道如何解决这个问题。我遇到过几个解决方案,但都没有用。

对于那些感兴趣的人,这里是通过 Controller 发送电子邮件的代码:

        if ($circle->business)
        {
            $email = $circle->creator->email;
            $name = $circle->creator->fullName();
        }
        else
        {
            $email = $user->email;
            $name = $user->fullName();
        }

        Mail::send('layouts.'.$this->client->template->file.'.views.emails.transaction-receipt', compact('user'), function($message) use($user)
        {
            $message->from($user->account->email, $user->account->name);
            $message->to($user->email, $user->name)->subject($user->account->name.' Transaction Receipt');
        });

最佳答案

我遇到了同样的问题,因为我的 SendGrid 密码不正确。

如果您的凭据不正确,SendGrid 不会发送响应。

关于php - Laravel:期待响应 250 但得到 ""消息 "",我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/23702362/

相关文章:

php - 如何在 laravel blade.php 文件中使用外部 PHP 文件?

mysql - laravel DB::select 查询分页错误

python - 通过 python IMAP 使用消息 ID 检索/搜索电子邮件

php - 如何创建新闻源(AJAX 新闻源)

php - (Datalife Engine) PHP Random Image Rotation 图片不显示

php - Laravel 在所有请求中检查登录和 Auth::check()

javascript - 如何连接正确的链接目录文件

php - 请求-> 除了在laravel 5 中给我一个数组而不是一个请求对象

javascript - jQuery 电子邮件地址输入

android - 何时删除用于附加电子邮件的 Intent.SEND 中使用的临时文件?