function addCustomProperties($mailingId, $properties) {

        $xml = new SimpleXMLElement("<?xml version=\"1.0\"?><properties></properties>");

        if (is_array($properties)) {
            foreach ($properties as $property) {
                $this->sxml_append($xml, $property->toXML());
            }
        } else {
            $this->sxml_append($xml, $properties->toXML());
        }

        return $this->post("mailings/${mailingId}/settings/properties", $xml->asXML());
    }