Back to Documentation Overview
listUnsubscribe
public static listUnsubscribe(string uid, string id, string email_address, boolean delete_member, boolean send_goodbye, boolean send_notify)
Unsubscribe the given email address from the list
- Section:
- List Related
- Parameters:
uid the id for your user account. Get by calling login($user, $pass) id the list id to connect to email_address the email address to unsubscribe delete_member flag to completely delete the member from your list instead of just unsubscribing, default to false send_goodbye flag to send the goodbye email to the email address, defaults to true send_notify 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)
- <?php
- /**
- This Example shows how to pull the Info for a Member of a List using the MCAPI.php
- class and do some basic error checking.
- **/
- // Include the MailChimp API code. Do Not Edit This!
- include('inc/MCAPI.class.php');
- include('inc/config.inc.php'); //contains username & password
- $retval = $acct->listUnsubscribe( $listId,$email_to_remove);
- if ($retval === true){
- //Do something useful!
- } else {
- }
- ?>
Examples (1)
download example code[1] mcapi_listUnsubscribe.php
|
Add New Note
User Contributed Notes for
listUnsubscribe |
|---|
| No notes, yet... Will you be the first?? |