You are here

function CMBase::subscriberUnsubscribe in Campaign Monitor 5.2

*

Parameters

string $email Email address.: * @param int $list_id (Optional) A valid List ID to check against. If not given, the default class property is used. * @param boolean $check_subscribed If true, does the Subscribers.GetIsSubscribed API method instead. * @return mixed A parsed response from the server, or null if something failed. * @see http://www.campaignmonitor.com/api/Subscriber.Unsubscribe.aspx

1 call to CMBase::subscriberUnsubscribe()
CMBase::subscribersGetIsSubscribed in lib/CMBase.php
*

File

lib/CMBase.php, line 509

Class

CMBase

Code

function subscriberUnsubscribe($email, $list_id = null, $check_subscribed = false) {
  if (!$list_id) {
    $list_id = $this->list_id;
  }
  $action = 'Subscriber.Unsubscribe';
  if ($check_subscribed) {
    $action = 'Subscribers.GetIsSubscribed';
  }
  return $this
    ->makeCall($action, array(
    'params' => array(
      'ListID' => $list_id,
      'Email' => $email,
    ),
  ));
}