I did this:
Downloaded and installed a tnef parser thingie found at
http://world.std.com/~damned/software.html
Then I wrote this php function
function tnef_decode($rawtnef) {
$indexfile = tempnam("/tmp" , "tnef-index");
$dir = "/tmp/tnefparser-" . md5(microtime());
mkdir($dir, 0700);
$cmd = "/usr/local/bin/tnef -f - -v -C $dir> $indexfile 2>&1 ";
if ($tnef = popen($cmd, 'w')) {
$cnt = fwrite($tnef, $rawtnef);
$ret = (pclose($tnef) >> 8) & 0xFF;
$index = file($indexfil);
foreach($index as $file) {
$file = $dir . "/" . trim($file);
// Open file
$f = fopen($file, 'r');
// Les inn innhold
$content = fread($f, filesize($file));
$parts[basename($file)] = $content;
// close tmpfile
fclose($f);
// delete tmpfile
unlink($file);
}
rmdir($dir);
unlink($indexfil);
}
return $parts;
}
It returns an associative array with partnames as keys, and part content as value