From: stekkel Date: Thu, 7 Mar 2002 14:14:10 +0000 (+0000) Subject: Added function to get entity header of an attached message X-Git-Url: https://vcs.fsf.org/?p=squirrelmail.git;a=commitdiff_plain;h=43786d5ceabf332c814c8d02eaf12a3f7aca6d79 Added function to get entity header of an attached message git-svn-id: https://svn.code.sf.net/p/squirrelmail/code/trunk/squirrelmail@2548 7612ce4b-ef26-0410-bec9-ea0150e637f0 --- diff --git a/functions/imap_messages.php b/functions/imap_messages.php index 551f3ff9..34522142 100755 --- a/functions/imap_messages.php +++ b/functions/imap_messages.php @@ -298,6 +298,18 @@ function sqimap_get_message_header ($imap_stream, $id, $mailbox) { return $header; } +/**************************************************************************** + ** Wrapper function that reformats the entity header information. + ****************************************************************************/ +function sqimap_get_ent_header ($imap_stream, $id, $mailbox, $ent) { + $read = sqimap_run_command ($imap_stream, "FETCH $id:$id BODY[$ent.HEADER]", true, $response, $message); + $header = sqimap_get_header($imap_stream, $read); + $header->id = $id; + $header->mailbox = $mailbox; + return $header; +} + + /**************************************************************************** ** Wrapper function that returns entity headers for use by decodeMime ****************************************************************************/