$numshow = $current["msgs"]; if ($_REQUEST["msgid"] == $mailsum) { $smarty->assign('next', ''); } else { $smarty->assign('next', $_REQUEST["msgid"] + 1); } if ($_REQUEST["msgid"] > 1) { $smarty->assign('prev', $_REQUEST["msgid"] - 1); } else { $smarty->assign('prev', ''); } $full = $pop3->getMsg($_REQUEST["msgid"]); $pop3->disconnect(); $output = mime::decode($full); //echo "<pre>OUTPUT:";print_r($output); echo"</pre>"; $bodies = mime::get_bodies($output); $temp_max = count($bodies); for ($i = 0; $i < $temp_max; $i++) { $bodies[$i] = strip_tags($bodies[$i], "<a><b><i><table><tr><td><th><ul><li><img><hr><ol><br /><h1><h2><h3><h4><h5><h6><div><span><font><form><input><textarea><checkbox><select>"); } $attachments = mime::get_attachments($output); $smarty->assign('attachs', $attachments); $smarty->assign('bodies', $bodies); $allbodies = join("\n", $bodies); $allbodies = "\n\n------------------------------------------\n" . $allbodies; $smarty->assign('allbodies', htmlspecialchars($allbodies)); $to_addresses = $output['header']["from"]; // Get email addresses from the "from" portion $to_addresses = split(',', $to_addresses); $temp_max = count($to_addresses); for ($i = 0; $i < $temp_max; $i++) {