Sfoglia il codice sorgente

Added function to get entity header of an attached message

stekkel 23 anni fa
parent
commit
47e7d84c25
1 ha cambiato i file con 12 aggiunte e 0 eliminazioni
  1. 12 0
      functions/imap_messages.php

+ 12 - 0
functions/imap_messages.php

@@ -298,6 +298,18 @@ function sqimap_get_message_header ($imap_stream, $id, $mailbox) {
     return $header;
     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
  **  Wrapper function that returns entity headers for use by decodeMime
  ****************************************************************************/
  ****************************************************************************/