listSubscribeSMS()

This function adds a new phone number to existing list with all additional values of the field.

listSubscribeSMS(string $id, string $phone, array $merge_vars, boolean $update_existing) : boolean
Only active contacts can be unsubscribed or deleted. This function will not work on inactive or already unsubscribed recipients.
Input parametrs
  • id - list ID
  • phone - phone number
  • merge_vars - values of merge fields (array)
  • Merge fields are: FNAME, LNAME, EMAIL and other your defined fields.
  • update_existing - whether existing emails are restored (true, false) (optional). Default value is false.

Array of merge fields. Each merge field is represented as an array that includes:

  • true, if request for adding new phone number has succeeded.

Examples

mgapi_listSubscribeSMS.php
 $my_phone, 'FNAME' => 'Joe'); // or $merge_vars = array();
$update_existing = false;
 
$retval = $api->listSubscribeSMS($id, $phone, $merge_vars, $update_existing);
 
header("Content-Type: text/plain");
if ($api->errorCode) {
    echo "Unable to load listSubscribeSMS()!\n";
    echo "\tCode=" . $api->errorCode . "\n";
    echo "\tMsg=" . $api->errorMessage . "\n";
} else {
    echo "Returned: " . $retval . "\n";
}

© 2010-2017 Mailigen. All rights reserved.