Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Laravel: Expecting response 250 but got "" with message ""

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');
        });
like image 640
Zac Brown Avatar asked May 16 '14 18:05

Zac Brown


1 Answers

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

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

like image 98
Ben Elgar Avatar answered Oct 04 '22 03:10

Ben Elgar