MailChimp Unsubscribe in PHP -
i having terrible time trying sort out unsubscribe mailchimp via php.
i'm using mailchimp-api-php link repo
i haven't been able track downwards examples of unsubscribe code, using api , php code in wrapper provided, i've set together, seems right me:
$unsub = $mailchimp_lists->unsubscribe( $list_id, $email, true, //delete_member true, //send_goodbye false //send_notify );
the php error is:
uncaught exception 'mailchimp_list_mergefieldrequired' message 'fname must provided - please come in value.
nowhere in api docs mention needing or place include fname in unsubscribe function. i'm lost here , desperately hoping can lite way.
have @ documentation, here: https://bitbucket.org/mailchimp/mailchimp-api-php/src/7ac99b5ac746d5875c5c350ad7e3b83674c83ec1/src/mailchimp/lists.php?at=master#cl-747 - unsubscribe method expects sec parameter array email key. write code this:
$unsub = $mailchimp_lists->unsubscribe( $list_id, array('email' => $email), true, //delete_member true, //send_goodbye false //send_notify );
php mailchimp
No comments:
Post a Comment