At the end of SendGridMailSystem->send() we have:

    if ($response_code = 200) {
      // If the code is 200 we are good to finish and proceed.
      return TRUE;
    }
    // Default to low. Sending failed.
    return FALSE;

We need:

    if ($response_code == 200) {
      // If the code is 200 we are good to finish and proceed.
      return TRUE;
    }
    // Default to low. Sending failed.
    return FALSE;

Comments

David Sparks created an issue. See original summary.

  • Perignon committed 42181a7 on 7.x-1.x
    Issue #3170595: SendGrid response code ignored due to typo
    
perignon’s picture

Status: Active » Needs review
djdevin’s picture

Status: Needs review » Fixed

I confirmed this fixes the issue.

But please see #3243696: Various issues with error reporting, the error message doesn't make it to the logs.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.