Skip to content

V3 API not Creating SendGridObject #732

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
Tom-Condon opened this issue Oct 12, 2018 · 2 comments
Closed

V3 API not Creating SendGridObject #732

Tom-Condon opened this issue Oct 12, 2018 · 2 comments
Labels
difficulty: unknown or n/a fix is unknown in difficulty status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library

Comments

@Tom-Condon
Copy link

Tom-Condon commented Oct 12, 2018

Issue Summary

Repeated tries to get the V3 API running and sending emails has failed, even with the bare minimum of code needed to send an email.

I have tried this with and without installing SendGrid through Composer. A two week back and forth with SendGrid Support staff did not solve this problem, and I was directed here.

Steps to Reproduce

  1. Download the newest release (Composer or not)
  2. Copy and paste the bare minimum code
  3. Set up the API Key in the environment
  4. Run with php
// print_r() of the $sendgrid object
SendGrid Object
(
    [namespace:protected] => SendGrid
    [client] => SendGrid\Client Object
        (
            [host:protected] => https://api.sendgrid.com
            [headers:protected] => Array
                (
                    [0] => Authorization: Bearer MY_API_KEY
                    [1] => User-Agent: sendgrid/7.2.1;php
                    [2] => Accept: application/json
                )

            [version:protected] => /v3
            [path:protected] => Array
                (
                )

            [curlOptions:protected] => Array
                (
                )

            [isConcurrentRequest:protected] =>
            [savedRequests:protected] => Array
                (
                )

            [retryOnLimit:protected] =>
            [methods:SendGrid\Client:private] => Array
                (
                    [0] => get
                    [1] => post
                    [2] => patch
                    [3] => put
                    [4] => delete
                )

        )

    [version] => 7.2.1
)

// Status Code
0

// Response Headers
Array
(
    [0] =>
)

Technical details:

  • sendgrid-php Version: master (latest commit: [commit number])
  • PHP Version: 5.6.25
@thinkingserious thinkingserious added type: question question directed at the library difficulty: unknown or n/a fix is unknown in difficulty status: waiting for feedback waiting for feedback from the submitter labels Nov 7, 2018
@thinkingserious
Copy link
Contributor

Hello @Tom-Condon,

I believe this to be the issue. Please take a look and let me know how it works out.

Thanks!

With Best Regards,

Elmer

@aroach
Copy link

aroach commented Nov 8, 2018

@Tom-Condon I've tried to reproduce this, but I haven't been able to. I copied the hello world, and it seems to send the email OK. I'm using PHP 5.6.38. Just thinking out loud, but any possibilities of a transparent proxy that could be in the mix in your environment? Can you use curl to send an email ok? https://sendgrid.com/docs/for-developers/sending-email/api-getting-started/#send-your-email-using-the-api This could eliminate environmental factors on your network or data center.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty: unknown or n/a fix is unknown in difficulty status: waiting for feedback waiting for feedback from the submitter type: question question directed at the library
Projects
None yet
Development

No branches or pull requests

4 participants