Hi Thomas. I noticed on Codeplex that you'd updated the MC4Umbraco sourcecode to allow for the new mailchimp datacenters. This works great in the AddSubscriber method but it looks like the UnSubscribe method still errors. I copied your approach in the other method and changed the code as follows on my version:
The unsubscribe template gives me an error like this one:
Invalid Mailchimp API Key: (X). You are accessing the wrong datacenter - your client library may not properly support our datacenter mapping scheme. (104)
I tought this might be related, I am on an Umbraco v 4.0.3 installation , .NET Version: 4.0, MailChimp4Umbraco 0.92
Is there a .dll or something that needs to be replaced for this to work?
In the BusinessLogic project, open ChimpApi/MailChimpCommunicator.cx swap the contents of the UnSubscribe method with the code below. When that's done, you should be able to compile a new Mailchimp4Umbraco.Businesslogic.dll and overwrite the version you have on your sever. I'm sorry for the inconvenience, I will fix the package once I get the time :)
Unsubscribe with new Mailchimp Datacenters
Hi Thomas. I noticed on Codeplex that you'd updated the MC4Umbraco sourcecode to allow for the new mailchimp datacenters. This works great in the AddSubscriber method but it looks like the UnSubscribe method still errors. I copied your approach in the other method and changed the code as follows on my version:
It's playing nicely now. Just thought I'd let you know, in case it's of any use to you.
Cheers
Jon
Hey Jon
You are absolutely right. Thanks a lot!
/Thomas
Hi there, thanks for sharing the great package!
The unsubscribe template gives me an error like this one:
Invalid Mailchimp API Key: (X). You are accessing the wrong datacenter - your client library may not properly support our datacenter mapping scheme. (104)
I tought this might be related, I am on an Umbraco v 4.0.3 installation , .NET Version: 4.0, MailChimp4Umbraco 0.92
Is there a .dll or something that needs to be replaced for this to work?
Thanks for any help!
Antonio
Hi Antonio
There is a bug in the current version, causing the error you see.
If it's urgent, I suggest that you download the package sourcecode from codeplex here: http://mailchimp4umbraco.codeplex.com/releases/view/47230
In the BusinessLogic project, open ChimpApi/MailChimpCommunicator.cx swap the contents of the UnSubscribe method with the code below.
When that's done, you should be able to compile a new Mailchimp4Umbraco.Businesslogic.dll and overwrite the version you have on your sever.
I'm sorry for the inconvenience, I will fix the package once I get the time :)
// Build API call URL
string dataCenter = String.Empty;
if (!String.IsNullOrEmpty(_APIKey))
{
dataCenter = _APIKey.Substring(_APIKey.Length - 3, 3) + ".";
}
// Build API call URL
string APIUrl = string.Format("http://{4}api.mailchimp.com/1.2/?method=listUnsubscribe&apikey={0}&id={2}&email_address={1}&delete_member=1&send_goodbye=1&send_notify=0&output=xml", _APIKey, emailAddress, mailChimpListId, dataCenter);
#region Call API
try
{
byte[] data = _webClient.DownloadData(APIUrl);
return new MailChimpResponse(ASCIIEncoding.ASCII.GetString(data));
}
catch (Exception)
{
// If we end up here, the MailChimp API URL is not valid
return new MailChimpResponse(string.Empty);
}
#endregion
Hi Thomas
So it worked, I just had to add the list Id into the unsubscribe macro and it all worked awesome!
Thanks much!
is working on a reply...