} break; default: die("Unknown Type: {$part['mime-type']}\n"); } } } else { // Just a Single Text Part $wo['note'] = $imap->mailGet($i); } $wo->save(); echo "WO: #{$wo['id']} {$wo['requester']}\n"; // {$wo->note}\n"; $imap->mailWipe($i); } $imap->mailFlush(); exit; function mail_part_list($stat, $depth = null) { if ($depth === null) { $depth = null; } $count = 1; // echo "Depth: $depth\n"; if (empty($stat['parts'])) { return false; } // print_r($stat['parts']); // exit; $list = array(); foreach ($stat['parts'] as $i => $chk) {