function MCAPI::listBatchUnsubscribe in Mailchimp 6.2
Same name and namespace in other branches
- 5.2 MCAPI.class.php \MCAPI::listBatchUnsubscribe()
- 5 MCAPI.class.php \MCAPI::listBatchUnsubscribe()
- 6 MCAPI.class.php \MCAPI::listBatchUnsubscribe()
- 7 MCAPI.class.php \MCAPI::listBatchUnsubscribe()
Unsubscribe a batch of email addresses to a list
Related
@example mcapi_listBatchUnsubscribe.php
@returnf integer success_count Number of email addresses that were succesfully added/updated @returnf integer error_count Number of email addresses that failed during addition/updating @returnf array errors Array of error structs. Each error struct will contain "code", "message", and "email"
Parameters
string $id the list id to connect to. Get by calling lists():
array $emails array of email addresses to unsubscribe:
boolean $delete_member flag to completely delete the member from your list instead of just unsubscribing, default to false:
boolean $send_goodbye flag to send the goodbye email to the email addresses, defaults to true:
boolean $send_notify flag to send the unsubscribe notification email to the address defined in the list email notification settings, defaults to false:
Return value
struct Array of result counts and any errors that occurred
File
- ./
MCAPI.class.php, line 1574
Class
Code
function listBatchUnsubscribe($id, $emails, $delete_member = false, $send_goodbye = true, $send_notify = false) {
$params = array();
$params["id"] = $id;
$params["emails"] = $emails;
$params["delete_member"] = $delete_member;
$params["send_goodbye"] = $send_goodbye;
$params["send_notify"] = $send_notify;
return $this
->callServer("listBatchUnsubscribe", $params);
}