comparison src/readpst.c @ 354:843705c25b45

code cleanup; content-id in brackets
author Carl Byington <carl@five-ten-sg.com>
date Tue, 22 Dec 2015 08:59:46 -0800
parents 09dd5299d91c
children 544d57fe6bc6
comparison
equal deleted inserted replaced
353:19b795b6f6a0 354:843705c25b45
1189 fprintf(f_output, "Content-Type: %s\n", attach->mimetype.str); 1189 fprintf(f_output, "Content-Type: %s\n", attach->mimetype.str);
1190 } 1190 }
1191 fprintf(f_output, "Content-Transfer-Encoding: base64\n"); 1191 fprintf(f_output, "Content-Transfer-Encoding: base64\n");
1192 1192
1193 if (attach->content_id.str) { 1193 if (attach->content_id.str) {
1194 fprintf(f_output, "Content-ID: %s\n", attach->content_id.str); 1194 fprintf(f_output, "Content-ID: <%s>\n", attach->content_id.str);
1195 } 1195 }
1196 1196
1197 if (attach->filename2.str) { 1197 if (attach->filename2.str) {
1198 // use the long filename, converted to proper encoding if needed. 1198 // use the long filename, converted to proper encoding if needed.
1199 // it is already utf8 1199 // it is already utf8
1775 } 1775 }
1776 1776
1777 if (item->email->encrypted_body.data) { 1777 if (item->email->encrypted_body.data) {
1778 pst_item_attach* attach = (pst_item_attach*)pst_malloc(sizeof(pst_item_attach)); 1778 pst_item_attach* attach = (pst_item_attach*)pst_malloc(sizeof(pst_item_attach));
1779 DEBUG_INFO(("Adding encrypted text body as attachment\n")); 1779 DEBUG_INFO(("Adding encrypted text body as attachment\n"));
1780 attach = (pst_item_attach*) pst_malloc(sizeof(pst_item_attach));
1781 memset(attach, 0, sizeof(pst_item_attach)); 1780 memset(attach, 0, sizeof(pst_item_attach));
1782 attach->next = item->attach; 1781 attach->next = item->attach;
1783 item->attach = attach; 1782 item->attach = attach;
1784 attach->data.data = item->email->encrypted_body.data; 1783 attach->data.data = item->email->encrypted_body.data;
1785 attach->data.size = item->email->encrypted_body.size; 1784 attach->data.size = item->email->encrypted_body.size;
1787 } 1786 }
1788 1787
1789 if (item->email->encrypted_htmlbody.data) { 1788 if (item->email->encrypted_htmlbody.data) {
1790 pst_item_attach* attach = (pst_item_attach*)pst_malloc(sizeof(pst_item_attach)); 1789 pst_item_attach* attach = (pst_item_attach*)pst_malloc(sizeof(pst_item_attach));
1791 DEBUG_INFO(("Adding encrypted HTML body as attachment\n")); 1790 DEBUG_INFO(("Adding encrypted HTML body as attachment\n"));
1792 attach = (pst_item_attach*) pst_malloc(sizeof(pst_item_attach));
1793 memset(attach, 0, sizeof(pst_item_attach)); 1791 memset(attach, 0, sizeof(pst_item_attach));
1794 attach->next = item->attach; 1792 attach->next = item->attach;
1795 item->attach = attach; 1793 item->attach = attach;
1796 attach->data.data = item->email->encrypted_htmlbody.data; 1794 attach->data.data = item->email->encrypted_htmlbody.data;
1797 attach->data.size = item->email->encrypted_htmlbody.size; 1795 attach->data.size = item->email->encrypted_htmlbody.size;