The DeleteEmailAddress service allows you to delete existing email addresses within a Flexmail mailing list
SOAP Action: DeleteEmailAddress
SOAP Return Object: DeleteEmailAddressResp
The following table describes the parameters used for calling the DeleteEmailAddress service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | Y | APIRequestHeader | Header for authentication |
mailingListId | Y | Integer | Id of the mailing list to delete |
emailAddressType | Y | EmailAddressType | Email address to delete |
The following table describes the parameters returned from the DeleteEmailAddress service.
Parameter | Mandatory | Type | Description |
---|---|---|---|
header | / | APIResponseHeader | Header containing authentication information |
errorCode | / | Integer | Numerical value of the error |
errorMessage | / | String | Short literal description of the error |
0 | No error |
---|---|
220 | Authentication error, see header object for detailed information |
221 | Mailing list id is mandatory |
222 | Mailing list id is invalid |
223 | Either flexmail id or reference id is required to delete |
224 | Invalid flexmail id |
226 | Email address could not be found |
227 | Internal error |
This example shows you the deletion of an email address with id 3152153.
<?php $header->userId = USER_ID; $header->userToken = USER_TOKEN; $deleteEmailAddressReq->header = $header; $deleteEmailAddressReq->mailingListId = 4563; $deleteEmailAddressReq->emailAddressType->flexmailId = 3152153; $deleteEmailAddressResp = $SoapClient->__soapCall("DeleteEmailAddress", array($deleteEmailAddressReq) ); if ($deleteEmailAddressResp->errorCode == 0) { echo "Email address deleted"; } else { echo "Email address delete failed: " . $deleteEmailAddressResp->errorMessage; } ?>