changeset 352:09dd5299d91c

Added Content-ID header support
author Igor Stroh <igor.stroh@rulim.de>
date Thu, 17 Dec 2015 12:03:44 +0100
parents 602869b958a3
children 19b795b6f6a0
files src/libpst.c src/libpst.h src/readpst.c
diffstat 3 files changed, 11 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/libpst.c	Fri Sep 11 13:16:09 2015 -0700
+++ b/src/libpst.c	Thu Dec 17 12:03:44 2015 +0100
@@ -2646,6 +2646,11 @@
                     NULL_CHECK(attach);
                     LIST_COPY_INT32("Attachment Mime Sequence", attach->sequence);
                     break;
+                case 0x3712: // PR_ATTACH_CONTENT_ID
+                    // content identification header (Content-ID)
+                    NULL_CHECK(attach);
+                    LIST_COPY_STR("Content ID", attach->content_id);
+                    break;
                 case 0x3A00: // PR_ACCOUNT
                     LIST_COPY_CONTACT_STR("Contact's Account name", item->contact->account_name);
                     break;
--- a/src/libpst.h	Fri Sep 11 13:16:09 2015 -0700
+++ b/src/libpst.h	Thu Dec 17 12:03:44 2015 +0100
@@ -606,6 +606,8 @@
     pst_string      filename2;
     /** mapi element 0x370e PR_ATTACH_MIME_TAG */
     pst_string      mimetype;
+    /** mapi element 0x3712 PR_ATTACH_CONTENT_ID  */
+    pst_string      content_id;
     /** mapi element 0x3701 PR_ATTACH_DATA_OBJ */
     pst_binary      data;
     /** only used if the attachment is by reference, in which case this is the id2 reference */
--- a/src/readpst.c	Fri Sep 11 13:16:09 2015 -0700
+++ b/src/readpst.c	Thu Dec 17 12:03:44 2015 +0100
@@ -1190,6 +1190,10 @@
     }
     fprintf(f_output, "Content-Transfer-Encoding: base64\n");
 
+    if (attach->content_id.str) {
+        fprintf(f_output, "Content-ID: %s\n", attach->content_id.str);
+    }
+
     if (attach->filename2.str) {
         // use the long filename, converted to proper encoding if needed.
         // it is already utf8