mailjet / mailjet-apiv3-php

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

SSL_ERROR_SYSCALL in connection to api.mailjet.com:443 connecting from Google App Engine #273

Closed theGreski closed 1 year ago

theGreski commented 1 year ago

I'm recently receiving cURL error number 35 "OpenSSL SSL_connect: SSL_ERROR_SYSCALL in connection to api.mailjet.com:443". Sometimes the emails are going through and suddenly getting this error response.

Hosted on Google App Engine on PHP 8.1 Using curl in php code:

$curl = curl_init();
curl_setopt($curl, CURLOPT_URL, 'https://api.mailjet.com/v3.1/send');
curl_setopt($curl, CURLOPT_POST, 1);
curl_setopt($curl, CURLOPT_POSTFIELDS, $jsonData);
curl_setopt($curl, CURLOPT_RETURNTRANSFER, true);
curl_setopt($curl, CURLOPT_HTTPHEADER, [
    'Content-Type: application/json',
    'Content-Length: ' . strlen($jsonData)
]);
curl_setopt($curl, CURLOPT_USERPWD, "{$MJ_PUBLIC}:{$MJ_PRIVATE}");

And this is the response info received:

{
    "url":"https:\/\/api.mailjet.com\/v3.1\/send",
    "content_type":null,
    "http_code":0,
    "header_size":0,
    "request_size":0,
    "filetime":-1,
    "ssl_verify_result":1,
    "redirect_count":0,
    "total_time":0.025453,
    "namelookup_time":0.013064,
    "connect_time":0.014417,
    "pretransfer_time":0,
    "size_upload":0,
    "size_download":0,
    "speed_download":0,
    "speed_upload":0,
    "download_content_length":-1,
    "upload_content_length":-1,
    "starttransfer_time":0,
    "redirect_time":0,
    "redirect_url":"",
    "primary_ip":"35.187.79.8",
    "certinfo":[],
    "primary_port":443,
    "local_ip":"169.254.8.1",
    "local_port":35159,
    "http_version":0,
    "protocol":2,
    "ssl_verifyresult":0,
    "scheme":"HTTPS"
}
EmanuelU commented 1 year ago

Mailjet is randomly blocking GCP IP addresses, sometimes for a short time and sometimes for a longer period

oleksandr-mykhailenko commented 1 year ago

Since, this is does not have technical solution. I close the ticket because it's network issues