You are here

public function MailchimpLists::removeMember in Mailchimp 8

Same name in this branch
  1. 8 lib/mailchimp-api-php/src/MailchimpLists.php \Mailchimp\MailchimpLists::removeMember()
  2. 8 lib/mailchimp-api-php/tests/src/MailchimpLists.php \Mailchimp\Tests\MailchimpLists::removeMember()

Removes a member from a Mailchimp list.

Parameters

string $list_id: The ID of the list.

string $email: The member's email address.

Return value

object

See also

http://developer.mailchimp.com/documentation/mailchimp/reference/lists/m...

1 call to MailchimpLists::removeMember()
MailchimpLists::removeMember in lib/mailchimp-api-php/tests/src/MailchimpLists.php
@inheritdoc
1 method overrides MailchimpLists::removeMember()
MailchimpLists::removeMember in lib/mailchimp-api-php/tests/src/MailchimpLists.php
@inheritdoc

File

lib/mailchimp-api-php/src/MailchimpLists.php, line 275

Class

MailchimpLists
Mailchimp Lists/Audiences library.

Namespace

Mailchimp

Code

public function removeMember($list_id, $email) {
  $tokens = [
    'list_id' => $list_id,
    'subscriber_hash' => md5(strtolower($email)),
  ];
  return $this
    ->request('DELETE', '/lists/{list_id}/members/{subscriber_hash}', $tokens);
}