mailjet / mailjet-apiv3-php

[API v3] Mailjet PHP Wrapper
http://dev.mailjet.com
MIT License
267 stars 86 forks source link

API Timeout #241

Closed BenjaminPorquet closed 1 year ago

BenjaminPorquet commented 2 years ago

Hello,

We are using mailjet/mailjet-apiv3-php in a symfony4 project

We sometime get this error

image

2022-01-24 14:32:23 Uncaught PHP Exception GuzzleHttp\Exception\ConnectException: "cURL error 7: couldn't connect to host (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.mailjet.com/v3.1/send" at /vendor/guzzlehttp/guzzle/src/Handler/CurlFactory.php line 210

and same at 2022-01-24 15:33:33

Does anyone have the same problem?

thanks a lot

cbrianbet commented 2 years ago

Getting the same problem as well

oleksandr-mykhailenko commented 2 years ago

Hello @BenjaminPorquet @cbrianbet

Could please add more details?, maybe I will help you. Does it happen only with send api endpoint and what payload do you have, as example maybe

BenjaminPorquet commented 2 years ago

Hello :)

i'm really sorry but i don't understand your question

$body = [
            'Messages' => [
                [
                    'From' => [
                        'Email' => $mailFrom,
                        'Name' => $name,
                    ],
                    'To' => [
                        [
                            'Email' => $to,
                            'Name' => $to,
                        ],
                    ],
                    'TemplateID' => $templateID,
                    'TemplateLanguage' => true,
                    'Subject' => $subject,
                    'Variables' => $variables,
                ],
            ],
        ];

        $response = $this->mailjetClient->post(\Mailjet\Resources::$Email, ['body' => $body]);

where $this->mailjetClient = $mailjetClient;

\Mailjet\Client $mailjetClient

i dont know what can i tell you more,

thanks a lot !

oleksandr-mykhailenko commented 2 years ago

Hello @BenjaminPorquet Do yo have this issue for a while ?

BenjaminPorquet commented 2 years ago

Hello,

I have been having this problem for about 2 years

oleksandr-mykhailenko commented 2 years ago

Hello,

I have been having this problem for about 2 years

Oh, I see. I think, this is something that happens sometimes, because we can't rely on 3rd party API for 100%. Sometimes it's network issues, sometimes something on server. So, there is no something in the SDK library that can resolve this issue. Even if we implement retry logic for Guzzle client

oleksandr-mykhailenko commented 1 year ago

Close issue due to inactivity