Skip to content

Response returning zero status code #328

@garyrutland

Description

@garyrutland

Issue Summary

Attempting to send mail has all of a sudden started returning zero response codes.

Steps to Reproduce

<?php

// get sendgrid
$sendgrid = new \SendGrid('MY_KEY');

// create sender and recipient
$from = new SendGrid\Email('App name', '[email protected]');
$to = new SendGrid\Email('Users name', '[email protected]');

// create subject and content
$subject = 'Email title';
$content = new SendGrid\Content('text/plain', 'Test content');

// create email
$mail = new SendGrid\Mail($from, $subject, $to, $content);

// send email
$result = $sendgrid->client->mail()->send()->post($mail);

Technical details:

SendGrid\Response Object
(
    [statusCode:protected] => 0
    [body:protected] => 
    [headers:protected] => Array
        (
            [0] => 
        )
)
  • sendgrid-php Version: master (latest commit: aa09fb8)
  • PHP Version: 7.0.11

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: questionquestion directed at the library

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions