Rewrote imap functions
[squirrelmail.git] / src / download.php
index 6aa7a89535a8276fd120a744bb33bc0dca556fe4..2a5b1a620e8e6a66ded13af15070ca0a6a670d7d 100644 (file)
@@ -4,7 +4,6 @@
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../functions/mime.php");
    include("../functions/page_header.php");
    include("../functions/imap.php");
    include("../functions/mime.php");
-   include("../functions/mailbox.php");
    include("../functions/date.php");
 
    include("../src/load_prefs.php");
    include("../functions/date.php");
 
    include("../src/load_prefs.php");
       echo "</TT></TD></TR></TABLE>";
    }
 
       echo "</TT></TD></TR></TABLE>";
    }
 
-   $imapConnection = loginToImapServer($username, $key, $imapServerAddress, 0);
-   selectMailbox($imapConnection, $mailbox, $numMessages);
+   $imapConnection = sqimap_login($username, $key, $imapServerAddress, 0);
+   sqimap_mailbox_select($imapConnection, $mailbox);
 
    // $message contains all information about the message
    // including header and body
 
    // $message contains all information about the message
    // including header and body
-   $message = fetchMessage($imapConnection, $passed_id, $mailbox);
+   $message = sqimap_get_message($imapConnection, $passed_id, $mailbox);
 
    $type0 = $message["ENTITIES"][$passed_ent_id]["TYPE0"];
    $type1 = $message["ENTITIES"][$passed_ent_id]["TYPE1"];
 
    $type0 = $message["ENTITIES"][$passed_ent_id]["TYPE0"];
    $type1 = $message["ENTITIES"][$passed_ent_id]["TYPE1"];
@@ -79,5 +78,5 @@
       }
    }
 
       }
    }
 
-   fputs($imapConnection, "1 logout\n");
+   sqimap_logout($imapConnection);
 ?>
 ?>