function sqimap_get_header ($imap_stream, $read) {
$i = 0;
while ($i < count($read)) {
+ // Set up some defaults
+ $header["TYPE0"] = "text";
+ $header["TYPE1"] = "plain";
+ $header["CHARSET"] = "us-ascii";
+
if (substr($read[$i], 0, 17) == "MIME-Version: 1.0") {
$header["MIME"] = true;
$i++;
if (strpos($cont, ";"))
$cont = substr($cont, 0, strpos($cont, ";"));
+
if (strpos($cont, "/")) {
$header["TYPE0"] = substr($cont, 0, strpos($cont, "/"));
$header["TYPE1"] = substr($cont, strpos($cont, "/")+1);