Home Forums Newsletter Plugin Support cURL error: 28 – Failed to connect to api.brevo.com port 443: Connection timeout

Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • #326612
    s.brunelle
    Participant

    I share a solution to an experienced problem. The newsletter-sendinblue addon does not work when the site is configured to go through a proxy.
    The result is a timeout on the curl call, as well as the blocking of Newsletter routing via Brevo (formerly sendinblue).
    See in the plugin.php code :
    the build_curl function: no curl_setopt of CURLOPT_PROXY.
    While waiting for this case to be fixed by the add-on authors, I had to patch the plugin: curl_setopt($ch, CURLOPT_PROXY, $proxy); with $proxy= (WP_PROXY_HOST ?? ”) . ‘:’ . (WP_PROXY_PORT ?? ”);
    I hope this feedback will be useful to others.

    #328136
    Stefano
    Keymaster

    Thank you very much, the addon has been updated. Save the Newsletter’s main setting to see the update notice (version 1.2.2).
    Let me know if it works on your env.

    Stefano.

    #328186
    s.brunelle
    Participant

    Hi,
    I downloaded and installed the last release 8.3.9.
    Then went to admin.php?page=newsletter_main_main
    Saved it
    Can’t see any changes regarding my Curl issue.
    Curl error remains : Last test failed with error “cURL error: 28 – Failed to connect to api.brevo.com port 443: Connection timed out”.
    Did I miss something?
    Regards,
    Sébastien

    #328205
    Stefano
    Keymaster

    Hi, since I have not an env. where to test the proxy configuration, could you check if the changes I made to the code are ok?
    Could be in your case one of the constants is not defined?

    if (defined(‘WP_PROXY_HOST’) && defined(‘WP_PROXY_PORT’)) {
    curl_setopt($ch, CURLOPT_PROXY, WP_PROXY_HOST . ‘:’ . WP_PROXY_PORT);
    }

    #328216
    Stefano
    Keymaster

    Sorry, you should update the brevo addon, the changes are in that plugin.

Viewing 5 posts - 1 through 5 (of 5 total)
  • You must be logged in to reply to this topic.