Added BASIC mime support. Not fully working yet.
[squirrelmail.git] / functions / imap.php
index 090f078e7b4c5190c1fc889024171367a8143bf2..4f11ed9072d7f43691a5f7232e6204fa280d4137 100644 (file)
@@ -28,6 +28,7 @@
          $temp .= $char;
          $char = substr($mailbox, $i, 1);
       }
+      echo $tmp;
       return strrev($temp);
    }
 
       }
    }
 
+   function deleteMessages($imapConnection, $a, $b, $numMessages, $trash_folder, $move_to_trash, $auto_expunge, $mailbox) {
+      /** check if they would like to move it to the trash folder or not */
+      if ($move_to_trash == true) {
+         $success = copyMessages($imapConnection, $a, $b, $trash_folder);
+         if ($success == true)
+            setMessageFlag($imapConnection, $a, $b, "Deleted");
+      } else {
+         setMessageFlag($imapConnection, $a, $b, "Deleted");
+      }
+   }
+   function stripComments($line) {
+      if (strpos($line, ";")) {
+         $line = substr($line, 0, strpos($line, ";"));
+      }
+
+      if (strpos($line, "(") && strpos($line, ")")) {
+         $full_line = $full_line . substr($line, 0, strpos($line, "("));
+         $full_line = $full_line . substr($line, strpos($line, ")")+1, strlen($line) - strpos($line, ")"));
+      } else {
+         $full_line = $line;
+      }
+      return $full_line;
+   }
 ?>