Nov 4, 2010, 12:31:10 PM11/4/10
to MailChimp API Discuss
I'm using the PHP wrapper (listsubscribe), and I'm attempting to pass
form data to the method I'm using within a Drupal module to add
subscriber. Here's the segment from the method:
$groupings = array(
'Subscriptions' => array(
'name' => 'Subscriptions',
'groups' => $subscriptions,
$merge_vars = array('FNAME'=>$firstName, 'LNAME'=>$lastName,
'GROUPINGS' => $groupings);
// By default this sends a confirmation email - you will not see new
// until the link contained in it is clicked!
$retval = $api->listSubscribe($listId, $email, $merge_vars, 'html');
Where $subscriptions is an array of the checked boxes from the form.
The subscribe passes, and I don't get a Mailchimp API error, but the
user isn't added with the appropriate groups.