mdEmail® Registration API

getAttrList($session_id, $domain_name, $username)

getAttrList should be called when a user needs a list of attributes for a given email account. It can be retrieved via a soap request using the "getAttrList" method to https://api.max.md/getAttrList.php?wsdl.

Response

The response comes in a soap object containing five elements.
  (string) code - A response code. This will be "000" if there is no error
  (string) message - A description of the reponse code
  (string) usage - A string containing the amount of bytes being used by all users in the domain
  (array) attr_key - An array containing a list of keys for the user
  (array) attr_val - An array containing a list of values for the user
Please note that the attr_key array is an array containing keys that should be matched with the values in attr_val. The key / value pairs can be matched using their index in their respective arrays.

Sample Code (using NuSoap)

$soap = new soapclient("https://api.max.md/getAttrList.php?wsdl",array( 'trace' => true, 'exceptions' => true, ));
$response= $soap->getAttrList($session_id, $domain_name, $username);
if ($response->code == '000') {
  $user_usage = $response->usage;
}else{
  echo $response->message;
}

The xml for the WSDL can be found here