|
@@ -119,6 +119,11 @@
|
|
function sqimap_get_header ($imap_stream, $read) {
|
|
function sqimap_get_header ($imap_stream, $read) {
|
|
$i = 0;
|
|
$i = 0;
|
|
while ($i < count($read)) {
|
|
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") {
|
|
if (substr($read[$i], 0, 17) == "MIME-Version: 1.0") {
|
|
$header["MIME"] = true;
|
|
$header["MIME"] = true;
|
|
$i++;
|
|
$i++;
|
|
@@ -136,6 +141,7 @@
|
|
if (strpos($cont, ";"))
|
|
if (strpos($cont, ";"))
|
|
$cont = substr($cont, 0, strpos($cont, ";"));
|
|
$cont = substr($cont, 0, strpos($cont, ";"));
|
|
|
|
|
|
|
|
+
|
|
if (strpos($cont, "/")) {
|
|
if (strpos($cont, "/")) {
|
|
$header["TYPE0"] = substr($cont, 0, strpos($cont, "/"));
|
|
$header["TYPE0"] = substr($cont, 0, strpos($cont, "/"));
|
|
$header["TYPE1"] = substr($cont, strpos($cont, "/")+1);
|
|
$header["TYPE1"] = substr($cont, strpos($cont, "/")+1);
|