MCAPI::listUnsubscribe
Unsubscribe the given email address from the list
Signature
public function listUnsubscribe(string
$id,
string
$email_address,
[boolean
$delete_member = false,
[boolean
$send_goodbye = true,
[boolean
$send_notify = true]]] )
Parameters
$id
—
string
- the list id to connect to. Get by calling lists()
$email_address
—
string
- the email address to unsubscribe OR the email "id" returned from listMemberInfo, Webhooks, and Campaigns
$delete_member
—
boolean
- flag to completely delete the member from your list instead of just unsubscribing, default to false
$send_goodbye
—
boolean
- flag to send the goodbye email to the email address, defaults to true
$send_notify
—
boolean
- flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to true
Returns
- boolean
- true on success, false on failure. When using MCAPI.class.php, the value can be tested and error messages pulled from the MCAPI object (see below)