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.
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.
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
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?
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.
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.