X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=blobdiff_plain;f=src%2Fdownload.php;h=2a5b1a620e8e6a66ded13af15070ca0a6a670d7d;hp=6aa7a89535a8276fd120a744bb33bc0dca556fe4;hb=813eba2f5f4695bd30b895cd148658f3b90bf120;hpb=d29aac0e3969fcd88d2dc76698ea802718c200e6 diff --git a/src/download.php b/src/download.php index 6aa7a895..2a5b1a62 100644 --- a/src/download.php +++ b/src/download.php @@ -4,7 +4,6 @@ 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"); @@ -30,12 +29,12 @@ echo ""; } - $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 = 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"]; @@ -79,5 +78,5 @@ } } - fputs($imapConnection, "1 logout\n"); + sqimap_logout($imapConnection); ?>