X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=src%2Fdownload.php;h=982c7e0f69d5d08579a334c42adc7f8d8b699a25;hb=c1e15177efc56cd1eb885787df0f4bcac53ea7dc;hp=6aa7a89535a8276fd120a744bb33bc0dca556fe4;hpb=e80b444be0527cf72b12aad8c02fc9c4f7863a3a;p=squirrelmail.git diff --git a/src/download.php b/src/download.php index 6aa7a895..982c7e0f 100644 --- a/src/download.php +++ b/src/download.php @@ -1,11 +1,18 @@ -"; echo ""; $urlmailbox = urlencode($mailbox); - echo "
"; + echo "
"; echo _("Download this as a file"); - echo "


"; + echo "


"; if ($type1 == "html") echo $body; else @@ -30,12 +37,12 @@ echo ""; } - $imapConnection = loginToImapServer($username, $key, $imapServerAddress, 0); - selectMailbox($imapConnection, $mailbox, $numMessages); + $imapConnection = sqimap_login($username, $key, $imapServerAddress, $imapPort, 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 +86,5 @@ } } - fputs($imapConnection, "1 logout\n"); + sqimap_logout($imapConnection); ?>