suppressedListMembers()

By sending a request you can obtain emails of the Global Suppression List (GSL).

suppressedListMembers(integer $start, integer $limit) : array
Input parameters
  • start - page number starting from which selection will be made (optional). Default value is 0.
  • limit - number of results returned in one page (optional). Default value is 25. Maximum allowable value is 15000.

Information obtained

Array of members. Each member is represented as an array consisting of:

  • id - email ID
  • email - email address
  • timestamp - date of adding email to the Global Suppression List in timestamp format

Examples

mgapi_suppressedListMembers.php
<?php
/**
 * This Example shows how to suppressedListMembers using the MGAPI.php class and do some basic error checking.
 */
require_once 'inc/MGAPI.class.php';
require_once 'inc/config.inc.php'; //contains apikey
 
$api = new MGAPI($apikey);
 
$start = 0;
$limit = 500;
 
$retval = $api->suppressedListMembers($start, $limit);
 
header("Content-Type: text/plain");
if ($api->errorCode) {
    echo "Unable to load suppressedListMembers()!";
    echo "\tCode=" . $api->errorCode . "\n";
    echo "\tMsg=" . $api->errorMessage . "\n";
} else {
    echo "Members returned: " . sizeof($retval) . "\n";
    foreach ($retval as $member) {
        echo "\t" . $member['email'] . " - " . $member['timestamp'] . "\n";
    }
}

© 2010-2018 Mailigen. All rights reserved.