I'm getting a number of mailchimp errors in watchdog with the message:

MCAPI Error: example@gmail.com has unsubscribed, and cannot be resubscribed by you. To prevent false spam complaints, they'll need to resubscribe of their own free will.

Here are screenshots from my watchdog:

http://i.imgur.com/0dghJQ0.png
http://i.imgur.com/xMjm5ml.png

Can someone please tell me what's likely to be going on here?

My best guess is that this is an issue where someone has subscribed to my newsletter, then unsubscribed, then tried to subscribe again via this module on their user profile form, but this module can't re-subscribe them, because they have previously clicked on an unsubscribe link?

If my reading is correct, I get the protection mailchimp has built in for users who have clicked on unsubscribe links in the past, but it seems like this is a clear case of the user explicitly opting back in, and should be allowed...

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

praveen@ewall’s picture

Hi,

Anybody found the solution for this issue, since I am also getting the same error. However, it was worked fine before. I am new to mailchimp integartions. Kindly guide to fix this issue. Thanks for your help in advance.

dmsmidt’s picture

Version: 7.x-2.x-dev » 7.x-3.x-dev
Status: Active » Closed (works as designed)

It's been a long time, but just for the record. This is still the case.

I've been in contact with Mailchimp and there is no real solution to the problem.
If someone unsubscribes it is impossible to resubscribe this person via a third party (read Drupal). This is a restriction by Mailchimp without workaround.
They require that the person in question resubscribes via Mailchimps own form. Or you can send a subscription confirmation mail through Mailchimps own Manage Subscriber page.

A partial workaround is to 'delete' a subscriber instead of 'unsubscribing'. Then you are able to re-subscribe through Drupal, although Mailchimp doesn't send Goodbye mails in this case. And still, if someone unsubscribes through the footer link of a mail, that person is not 'deleted', but gets status 'unsubscribed'.

jdhildeb’s picture

Title: MCAPI error: [email address] has unsubscribed, and cannot be resubscribed by you » Cannot resubscribe an email email address which has been unsubscribed
Version: 7.x-3.x-dev » 7.x-4.x-dev
Status: Closed (works as designed) » Needs review
FileSize
3.88 KB

With the new mailchimp API, the error message these days is:

"An error occurred updating john@example.com on list 3580ff2561. "400: Member In Compliance State - john@example.com is in a compliance state due to unsubscribe, bounce, or compliance review and cannot be subscribed."

I found a tip on stackoverflow that setting a subscriber's status to 'pending' would cause mailchimp to send them a confirmation (opt-in) email. It works!

I'm attaching a patch which implements this logic. It detects this specific error (when adding or updating a subscription), and re-tries the operation using the 'pending' status. If this succeeds, it displays a message to the user "Please check your email to confirm your subscription".

This resolves this issue for all of the use cases I am aware of.

Greg Boggs’s picture

This is great!

Greg Boggs’s picture

Status: Needs review » Reviewed & tested by the community
dmsmidt’s picture

Wauw! Great find, this was buggin me for ages.

  • ruscoe committed 0987476 on 7.x-4.x authored by jdhildeb
    Issue #2188819 by jdhildeb, dmsmidt, Greg Boggs, praveen@ewall,...
ruscoe’s picture

Status: Reviewed & tested by the community » Fixed

Works perfectly, thank you!

Status: Fixed » Closed (fixed)

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