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

Viewing 8 posts - 1 through 8 (of 8 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.

    #328360
    s.brunelle
    Participant

    Hi,
    After upgrading the brevo add-on I can’t access anymore to the brevo settings page.
    Brevo disapears in the Addons manager Menu and the page “admin.php?page=newsletter_sendinblue_index” disappears as well (your are not authorized to access this page). Sounds that your fix generate this issue. The add is well actived in the website plugins p age.

    #328362
    Stefano
    Keymaster

    Hi, it sounds like there is a problem with the addon. I see it on my test blog within the add-ons page.

    Do you have some kind of noticed on the admin side? Maybe a Newsletter update requirement or like?

    #328378
    s.brunelle
    Participant

    Hi,
    It’s ok after updating the newsletter plugin.
    Thanks for your help.
    In my case, both WP_PROXY_HOST and WP_PROXY_PORT are defined with a value.
    These are blank defined : WP_PROXY_USERNAME  and WP_PROXY_PASSWORD
    and WP_PROXY_BYPASS_HOSTS=localhost
    Regards.

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