The issue of not being able to use a proxy when connecting to the mailchimp API has come up several times before here and here.

With the move to the new v3 API we're now using a different client library (https://github.com/thinkshout/mailchimp-api-php) which in turn uses Guzzle to perform http requests. Since guzzle doesn't know about Drupal, the proxy_server and proxy_port variables are not used when connecting to mailchimp.

I imagine it working like this in the future:

  • mailchimp-api-php allows users (the mailchimp module in this case) to configure the guzzle client, PR pending see https://github.com/thinkshout/mailchimp-api-php/pull/33
  • the mailchimp module reads the proxy_* variables and passes them to the library if set, patch attached in this issue

I wanted this issue on record, but I propose to do nothing until the mailchimp library supports this.

Comments

jsst created an issue. See original summary.

aitala’s picture

Does this need to be rerolled with the new version (4.8) of MailChimp?

Thanks,
E

denix’s picture

Version: 7.x-4.x-dev » 7.x-4.8
Status: Needs work » Needs review

I confirm this is working well with version 4.8, otherwise mailchimp simply will not communicate with the API

denix’s picture

aitala’s picture

I'm now getting dropped connection messages from the browser with this patch setup when I look at the Mailchimp lists tab.... and ideas?

Ignore..

E

stephen-cox’s picture

The patch worked for me when using the 7x-4.8 version of the module.

Without it the module wasn't able to connect to Mailchimp though a corporate proxy, with the error:
An error occurred requesting list information from MailChimp. "cURL error 7: Failed to connect to us1.api.mailchimp.com port 443: Connection refused (see http://curl.haxx.se/libcurl/c/libcurl-errors.html)"

jsst’s picture

Status: Needs review » Reviewed & tested by the community

Several people confirmed the patch works, setting this one to RTBC.

Note: my original patch and patch #4 are for all intents and purposes identical.

  • ruscoe committed c2f7e39 on 7.x-4.x authored by jsst
    Issue #2820753 by jsst, denix, aitala, stephen-cox: Allow using HTTP...

ruscoe credited ruscoe.

ruscoe’s picture

Status: Reviewed & tested by the community » Fixed

Committed to the dev branch. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.