Laravel:期待响应250但得到“具有消息“” [英] Laravel: Expecting response 250 but got "" with message ""

查看:142
本文介绍了Laravel:期待响应250但得到“具有消息“”的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

 期望回复250但是得到了与消息

从我能够研究的内容,通过Sendgrid发送电子邮件时会出现问题(或任何提供者),接收服务器用空白代码进行响应。



SendGrid不是传递空白代码,而是将其转换为Sendgrid希望250(每件事情都可以)代码,但什么也没有。



我不知道如何解决这个问题。我遇到了一些解决方案,但是它们没有起作用。



对于有兴趣的人,这里是通过控制器发送电子邮件的代码: / p>

  if($ circle-> business)
{
$ email = $ circle->创建者 - >电子邮件;
$ name = $ circle-> creator-> fullName();
}
else
{
$ email = $ user->电子邮件;
$ name = $ user-> fullName();
}

Mail :: send('layouts。'。$ this-> client-> template-> file。'。views.emails.transaction-receipt',compact ($ user-> account->电子邮件,$ user->帐号 - ($ user)$($ user)$ b $ ($ user-> email,$ user-> name) - > subject($ user-> account-> name。)事务收据' );
});


解决方案

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



如果您的凭据不正确,SendGrid不会发送回复。


I continue to get this error from Laravel, but everything looks correct:

Expecting response 250 but got "" with message ""

From what I've been able to research, the problem occurs when sending email through Sendgrid (or any provider) and the receiving server responds with a blank code.

Instead of passing along the blank code, SendGrid translates it into this; Sendgrid expects the 250 (every thing is okay) code, but gets nothing.

I don't know how to fix this. I've come across a couple solutions, but they didn't work.

For those who are interested, here is the code that sends the email via a 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');
        });

解决方案

I had this same problem because my SendGrid password was incorrect.

If your credentials are incorrect SendGrid doesn't send a response.

这篇关于Laravel:期待响应250但得到“具有消息“”的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆