public static function getStructurePartData($structure, $part)
    {
        $part_a = self::getStructurePartArray($structure, $part);
        $data   = array();

        if (empty($part_a)) {
            return $data;
        }

        // content-type
        if (is_array($part_a[0])) {
            $data['type'] = 'multipart';
        }
        else {
            $data['type']     = strtolower($part_a[0]);
            $data['encoding'] = strtolower($part_a[5]);

            // charset
            if (is_array($part_a[2])) {
               foreach ($part_a[2] as $key => $val) {
                    if (strcasecmp($val, 'charset') == 0) {
                        $data['charset'] = $part_a[2][$key+1];
                        break;
                    }
                }
            }
        }

        // size
        $data['size'] = intval($part_a[6]);

        return $data;
    }