pst-extractor 1.8.0 → 1.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (64) hide show
  1. package/dist/ColumnDescriptor.class.d.ts +26 -26
  2. package/dist/ColumnDescriptor.class.js +51 -48
  3. package/dist/DescriptorIndexNode.class.d.ts +25 -26
  4. package/dist/DescriptorIndexNode.class.js +53 -53
  5. package/dist/LZFu.class.d.ts +11 -12
  6. package/dist/LZFu.class.js +95 -95
  7. package/dist/NodeInfo.class.d.ts +33 -33
  8. package/dist/NodeInfo.class.js +52 -52
  9. package/dist/NodeMap.class.d.ts +35 -35
  10. package/dist/NodeMap.class.js +86 -83
  11. package/dist/OffsetIndexItem.class.d.ts +23 -24
  12. package/dist/OffsetIndexItem.class.js +45 -45
  13. package/dist/OutlookProperties.d.ts +275 -275
  14. package/dist/OutlookProperties.js +281 -281
  15. package/dist/PSTActivity.class.d.ts +103 -103
  16. package/dist/PSTActivity.class.js +144 -144
  17. package/dist/PSTAppointment.class.d.ts +270 -271
  18. package/dist/PSTAppointment.class.js +376 -376
  19. package/dist/PSTAttachment.class.d.ts +172 -172
  20. package/dist/PSTAttachment.class.js +317 -314
  21. package/dist/PSTContact.class.d.ts +884 -884
  22. package/dist/PSTContact.class.js +1227 -1227
  23. package/dist/PSTDescriptorItem.class.d.ts +45 -46
  24. package/dist/PSTDescriptorItem.class.js +99 -96
  25. package/dist/PSTFile.class.d.ts +215 -216
  26. package/dist/PSTFile.class.js +818 -792
  27. package/dist/PSTFolder.class.d.ts +129 -129
  28. package/dist/PSTFolder.class.js +318 -307
  29. package/dist/PSTMessage.class.d.ts +788 -789
  30. package/dist/PSTMessage.class.js +1321 -1318
  31. package/dist/PSTMessageStore.class.d.ts +13 -13
  32. package/dist/PSTMessageStore.class.js +17 -17
  33. package/dist/PSTNodeInputStream.class.d.ts +122 -123
  34. package/dist/PSTNodeInputStream.class.js +514 -488
  35. package/dist/PSTObject.class.d.ts +133 -134
  36. package/dist/PSTObject.class.js +326 -323
  37. package/dist/PSTRecipient.class.d.ts +65 -65
  38. package/dist/PSTRecipient.class.js +103 -103
  39. package/dist/PSTTable.class.d.ts +52 -52
  40. package/dist/PSTTable.class.js +175 -172
  41. package/dist/PSTTable7C.class.d.ts +45 -45
  42. package/dist/PSTTable7C.class.js +281 -278
  43. package/dist/PSTTableBC.class.d.ts +31 -31
  44. package/dist/PSTTableBC.class.js +111 -108
  45. package/dist/PSTTableItem.class.d.ts +47 -48
  46. package/dist/PSTTableItem.class.js +124 -121
  47. package/dist/PSTTask.class.d.ts +146 -146
  48. package/dist/PSTTask.class.js +205 -205
  49. package/dist/PSTUtil.class.d.ts +134 -135
  50. package/dist/PSTUtil.class.js +795 -790
  51. package/dist/RecurrencePattern.class.d.ts +49 -50
  52. package/dist/RecurrencePattern.class.js +120 -120
  53. package/dist/index.d.ts +6 -6
  54. package/dist/index.js +15 -15
  55. package/example/package.json +7 -7
  56. package/example/test-min.ts +31 -12
  57. package/example/{test-mem.ts → test.ts} +38 -30
  58. package/example/testdata/output.txt +278 -0
  59. package/example/testdata/outputBody.txt +3404 -0
  60. package/example/yarn.lock +112 -50
  61. package/junit.xml +36 -36
  62. package/package.json +28 -27
  63. package/readme.md +1 -3
  64. package/example/test-max.ts +0 -251
@@ -1,1318 +1,1321 @@
1
- "use strict";
2
- Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.PSTMessage = void 0;
4
- /* eslint-disable @typescript-eslint/no-explicit-any */
5
- const long = require("long");
6
- const OutlookProperties_1 = require("./OutlookProperties");
7
- const PSTFile_class_1 = require("./PSTFile.class");
8
- const PSTNodeInputStream_class_1 = require("./PSTNodeInputStream.class");
9
- const PSTObject_class_1 = require("./PSTObject.class");
10
- const PSTTable7C_class_1 = require("./PSTTable7C.class");
11
- const PSTTableBC_class_1 = require("./PSTTableBC.class");
12
- const PSTUtil_class_1 = require("./PSTUtil.class");
13
- const LZFu_class_1 = require("./LZFu.class");
14
- const PSTAttachment_class_1 = require("./PSTAttachment.class");
15
- const PSTRecipient_class_1 = require("./PSTRecipient.class");
16
- var PidTagMessageFlags;
17
- (function (PidTagMessageFlags) {
18
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_READ"] = 1] = "MSGFLAG_READ";
19
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_UNMODIFIED"] = 2] = "MSGFLAG_UNMODIFIED";
20
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_SUBMIT"] = 4] = "MSGFLAG_SUBMIT";
21
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_UNSENT"] = 8] = "MSGFLAG_UNSENT";
22
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_HASATTACH"] = 16] = "MSGFLAG_HASATTACH";
23
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_FROMME"] = 32] = "MSGFLAG_FROMME";
24
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_ASSOCIATED"] = 64] = "MSGFLAG_ASSOCIATED";
25
- PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_RESEND"] = 128] = "MSGFLAG_RESEND";
26
- })(PidTagMessageFlags || (PidTagMessageFlags = {}));
27
- class PSTMessage extends PSTObject_class_1.PSTObject {
28
- /**
29
- * Creates an instance of PSTMessage. PST Message contains functions that are common across most MAPI objects.
30
- * Note that many of these functions may not be applicable for the item in question,
31
- * however there seems to be no hard and fast outline for what properties apply to which
32
- * objects. For properties where no value is set, a blank value is returned (rather than
33
- * an exception being raised).
34
- * @param {PSTFile} pstFile
35
- * @param {DescriptorIndexNode} descriptorIndexNode
36
- * @param {PSTTableBC} [table]
37
- * @param {Map<number, PSTDescriptorItem>} [localDescriptorItems]
38
- * @memberof PSTMessage
39
- */
40
- constructor(pstFile, descriptorIndexNode, pstTableBC, localDescriptorItems) {
41
- super(pstFile, descriptorIndexNode);
42
- this.recipientTable = null;
43
- this.attachmentTable = null;
44
- if (pstTableBC) {
45
- // pre-populate folder object with values
46
- this.prePopulate(descriptorIndexNode, pstTableBC, localDescriptorItems);
47
- }
48
- }
49
- /*
50
- PidTagMessageFlags
51
- https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
52
- */
53
- /**
54
- * The message is marked as having been read.
55
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
56
- * @readonly
57
- * @type {boolean}
58
- * @memberof PSTMessage
59
- */
60
- get isRead() {
61
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
62
- PidTagMessageFlags.MSGFLAG_READ) !=
63
- 0);
64
- }
65
- /**
66
- * The outgoing message has not been modified since the first time that it was saved; the incoming message has not been modified since it was delivered.
67
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
68
- * @readonly
69
- * @type {boolean}
70
- * @memberof PSTMessage
71
- */
72
- get isUnmodified() {
73
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
74
- PidTagMessageFlags.MSGFLAG_UNMODIFIED) !=
75
- 0);
76
- }
77
- /**
78
- * The message is marked for sending as a result of a call to the RopSubmitMessage ROP
79
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
80
- * @readonly
81
- * @type {boolean}
82
- * @memberof PSTMessage
83
- */
84
- get isSubmitted() {
85
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
86
- PidTagMessageFlags.MSGFLAG_SUBMIT) !=
87
- 0);
88
- }
89
- /**
90
- * The message is still being composed. It is saved, but has not been sent.
91
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
92
- * @readonly
93
- * @type {boolean}
94
- * @memberof PSTMessage
95
- */
96
- get isUnsent() {
97
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
98
- PidTagMessageFlags.MSGFLAG_UNSENT) !=
99
- 0);
100
- }
101
- /**
102
- * The message has at least one attachment.
103
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
104
- * @readonly
105
- * @type {boolean}
106
- * @memberof PSTMessage
107
- */
108
- get hasAttachments() {
109
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
110
- PidTagMessageFlags.MSGFLAG_HASATTACH) !=
111
- 0);
112
- }
113
- /**
114
- * The user receiving the message was also the user who sent the message.
115
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
116
- * @readonly
117
- * @type {boolean}
118
- * @memberof PSTMessage
119
- */
120
- get isFromMe() {
121
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
122
- PidTagMessageFlags.MSGFLAG_FROMME) !=
123
- 0);
124
- }
125
- /**
126
- * The message is an FAI message. An FAI Message object is used to store a variety of settings and
127
- * auxiliary data, including forms, views, calendar options, favorites, and category lists.
128
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
129
- * @readonly
130
- * @type {boolean}
131
- * @memberof PSTMessage
132
- */
133
- get isAssociated() {
134
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
135
- PidTagMessageFlags.MSGFLAG_ASSOCIATED) !=
136
- 0);
137
- }
138
- /**
139
- * The message includes a request for a resend operation with a nondelivery report.
140
- * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
141
- * @readonly
142
- * @type {boolean}
143
- * @memberof PSTMessage
144
- */
145
- get isResent() {
146
- return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
147
- PidTagMessageFlags.MSGFLAG_RESEND) !=
148
- 0);
149
- }
150
- /*
151
- Recipients
152
- */
153
- /**
154
- * Find, extract and load up all of the attachments in this email
155
- * @private
156
- * @memberof PSTMessage
157
- */
158
- processRecipients() {
159
- try {
160
- const recipientTableKey = 0x0692;
161
- if (this.recipientTable == null &&
162
- this.localDescriptorItems != null &&
163
- this.localDescriptorItems.has(recipientTableKey)) {
164
- const item = this.localDescriptorItems.get(recipientTableKey);
165
- let descriptorItems = new Map();
166
- if (item && item.subNodeOffsetIndexIdentifier > 0) {
167
- descriptorItems = this.pstFile.getPSTDescriptorItems(long.fromNumber(item.subNodeOffsetIndexIdentifier));
168
- }
169
- this.recipientTable = new PSTTable7C_class_1.PSTTable7C(new PSTNodeInputStream_class_1.PSTNodeInputStream(this.pstFile, item), descriptorItems);
170
- }
171
- }
172
- catch (err) {
173
- console.error('PSTMessage::processRecipients\n' + err);
174
- this.recipientTable = null;
175
- }
176
- }
177
- /**
178
- * Get the recipients table.
179
- * @readonly
180
- * @type {number}
181
- * @memberof PSTMessage
182
- */
183
- get numberOfRecipients() {
184
- if (this.recipientTable === null) {
185
- this.processRecipients();
186
- }
187
- return this.recipientTable ? this.recipientTable.rowCount : 0;
188
- }
189
- /**
190
- * Get specific recipient.
191
- * @param {number} recipientNumber
192
- * @returns {PSTRecipient}
193
- * @memberof PSTMessage
194
- */
195
- getRecipient(recipientNumber) {
196
- if (!this.recipientTable) {
197
- this.processRecipients();
198
- }
199
- if (!this.recipientTable) {
200
- throw new Error('PSTMessage::getRecipient recipientTable is null');
201
- }
202
- if (recipientNumber >= this.numberOfRecipients ||
203
- recipientNumber >= this.recipientTable.getItems().length) {
204
- throw new Error('PSTMessage::getRecipient unable to fetch recipient number ' +
205
- recipientNumber);
206
- }
207
- const recipientDetails = this.recipientTable.getItems()[recipientNumber];
208
- return recipientDetails
209
- ? new PSTRecipient_class_1.PSTRecipient(this.pstFile, recipientDetails)
210
- : null;
211
- }
212
- /**
213
- * Contains TRUE if a message sender wants notification of non-receipt for a specified recipient.
214
- * https://msdn.microsoft.com/en-us/library/office/cc979208.aspx
215
- * @readonly
216
- * @type {boolean}
217
- * @memberof PSTMessage
218
- */
219
- get isNonReceiptNotificationRequested() {
220
- return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_NON_RECEIPT_NOTIFICATION_REQUESTED) != 0);
221
- }
222
- /**
223
- * Contains TRUE if a message sender wants notification of non-deliver for a specified recipient.
224
- * https://msdn.microsoft.com/en-us/library/ms987568(v=exchg.65).aspx
225
- * @readonly
226
- * @type {boolean}
227
- * @memberof PSTMessage
228
- */
229
- get isOriginatorNonDeliveryReportRequested() {
230
- return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED) != 0);
231
- }
232
- /**
233
- * Contains the recipient type for a message recipient.
234
- * https://msdn.microsoft.com/en-us/library/office/cc839620.aspx
235
- * @readonly
236
- * @type {number}
237
- * @memberof PSTMessage
238
- */
239
- get recipientType() {
240
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RECIPIENT_TYPE);
241
- }
242
- /*
243
- Body (plain text, RTF, HTML)
244
- */
245
- /**
246
- * Plain text message body.
247
- * https://msdn.microsoft.com/en-us/library/office/cc765874.aspx
248
- * @readonly
249
- * @type {string}
250
- * @memberof PSTMessage
251
- */
252
- get body() {
253
- const codepage = this.getCodepage();
254
- if (codepage) {
255
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY, 0, codepage);
256
- }
257
- else {
258
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY);
259
- }
260
- }
261
- /**
262
- * Plain text body prefix.
263
- * @readonly
264
- * @type {string}
265
- * @memberof PSTMessage
266
- */
267
- get bodyPrefix() {
268
- return this.getStringItem(0x6619);
269
- }
270
- /**
271
- * Contains the Rich Text Format (RTF) version of the message text, usually in compressed form.
272
- * https://technet.microsoft.com/en-us/library/cc815911
273
- * @readonly
274
- * @type {string}
275
- * @memberof PSTMessage
276
- */
277
- get bodyRTF() {
278
- // do we have an entry for it?
279
- if (this.pstTableItems && this.pstTableItems.has(0x1009)) {
280
- // is it a reference?
281
- const item = this.pstTableItems.get(0x1009);
282
- if (item && item.data.length > 0) {
283
- return LZFu_class_1.LZFu.decode(item.data);
284
- }
285
- const ref = item ? item.entryValueReference : null;
286
- if (ref) {
287
- const descItem = this.localDescriptorItems
288
- ? this.localDescriptorItems.get(ref)
289
- : null;
290
- if (descItem != null) {
291
- return LZFu_class_1.LZFu.decode(descItem.getData());
292
- }
293
- }
294
- }
295
- return '';
296
- }
297
- /**
298
- * Contains the cyclical redundancy check (CRC) computed for the message text.
299
- * https://technet.microsoft.com/en-us/library/cc815532(v=office.15).aspx
300
- * @readonly
301
- * @type {number}
302
- * @memberof PSTMessage
303
- */
304
- get rtfSyncBodyCRC() {
305
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_BODY_CRC);
306
- }
307
- /**
308
- * Contains a count of the significant characters of the message text.
309
- * https://msdn.microsoft.com/en-us/library/windows/desktop/cc842324.aspx
310
- * @readonly
311
- * @type {number}
312
- * @memberof PSTMessage
313
- */
314
- get rtfSyncBodyCount() {
315
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_BODY_COUNT);
316
- }
317
- /**
318
- * Contains significant characters that appear at the beginning of the message text.
319
- * https://technet.microsoft.com/en-us/library/cc815400(v=office.15).aspx
320
- * @readonly
321
- * @type {string}
322
- * @memberof PSTMessage
323
- */
324
- get rtfSyncBodyTag() {
325
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_BODY_TAG);
326
- }
327
- /**
328
- * Contains a count of the ignorable characters that appear before the significant characters of the message.
329
- * https://msdn.microsoft.com/en-us/magazine/cc842437.aspx
330
- * @readonly
331
- * @type {number}
332
- * @memberof PSTMessage
333
- */
334
- get rtfSyncPrefixCount() {
335
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_PREFIX_COUNT);
336
- }
337
- /**
338
- * Contains a count of the ignorable characters that appear after the significant characters of the message.
339
- * https://msdn.microsoft.com/en-us/magazine/cc765795.aspx
340
- * @readonly
341
- * @type {number}
342
- * @memberof PSTMessage
343
- */
344
- get rtfSyncTrailingCount() {
345
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_TRAILING_COUNT);
346
- }
347
- /**
348
- * Gets codepage to use.
349
- * TODO - does this work?
350
- * @private
351
- * @returns {(string | null | undefined)}
352
- * @memberof PSTMessage
353
- */
354
- getCodepage() {
355
- let cpItem = this.pstTableItems
356
- ? this.pstTableItems.get(OutlookProperties_1.OutlookProperties.PR_INTERNET_CPID)
357
- : null;
358
- if (cpItem == null) {
359
- cpItem = this.pstTableItems
360
- ? this.pstTableItems.get(OutlookProperties_1.OutlookProperties.PR_MESSAGE_CODEPAGE)
361
- : null;
362
- }
363
- if (cpItem != null) {
364
- return PSTUtil_class_1.PSTUtil.getInternetCodePageCharset(cpItem.entryValueReference);
365
- }
366
- return null;
367
- }
368
- /**
369
- * Contains the HTML version of the message text.
370
- * @readonly
371
- * @type {string}
372
- * @memberof PSTMessage
373
- */
374
- get bodyHTML() {
375
- const codepage = this.getCodepage();
376
- if (codepage) {
377
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY_HTML, 0, codepage);
378
- }
379
- else {
380
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY_HTML);
381
- }
382
- }
383
- /*
384
- Attachments
385
- */
386
- /**
387
- * Processes table which holds attachments.
388
- * @private
389
- * @memberof PSTMessage
390
- */
391
- processAttachments() {
392
- const attachmentTableKey = 0x0671;
393
- if (this.attachmentTable == null &&
394
- this.localDescriptorItems != null &&
395
- this.localDescriptorItems.has(attachmentTableKey)) {
396
- const item = this.localDescriptorItems.get(attachmentTableKey);
397
- let descriptorItems = new Map();
398
- if (item && item.subNodeOffsetIndexIdentifier > 0) {
399
- descriptorItems = this.pstFile.getPSTDescriptorItems(long.fromValue(item.subNodeOffsetIndexIdentifier));
400
- }
401
- this.attachmentTable = new PSTTable7C_class_1.PSTTable7C(new PSTNodeInputStream_class_1.PSTNodeInputStream(this.pstFile, item), descriptorItems);
402
- }
403
- }
404
- /**
405
- * Number of attachments by counting rows in attachment table.
406
- * @readonly
407
- * @type {number}
408
- * @memberof PSTMessage
409
- */
410
- get numberOfAttachments() {
411
- try {
412
- this.processAttachments();
413
- }
414
- catch (err) {
415
- console.error('PSTMessage::numberOfAttachments\n' + err);
416
- return 0;
417
- }
418
- return this.attachmentTable ? this.attachmentTable.rowCount : 0;
419
- }
420
- /**
421
- * Get specific attachment from table using index.
422
- * @param {number} attachmentNumber
423
- * @returns {PSTAttachment}
424
- * @memberof PSTMessage
425
- */
426
- getAttachment(attachmentNumber) {
427
- this.processAttachments();
428
- let attachmentCount = 0;
429
- if (this.attachmentTable != null) {
430
- attachmentCount = this.attachmentTable.rowCount;
431
- }
432
- if (!this.attachmentTable) {
433
- throw new Error('PSTMessage::getAttachment attachmentTable is null');
434
- }
435
- if (!this.localDescriptorItems) {
436
- throw new Error('PSTMessage::getAttachment localDescriptorItems is null');
437
- }
438
- if (attachmentNumber >= attachmentCount) {
439
- throw new Error('PSTMessage::getAttachment unable to fetch attachment number ' +
440
- attachmentNumber);
441
- }
442
- // we process the C7 table here, basically we just want the attachment local descriptor...
443
- const attachmentDetails = this.attachmentTable.getItems()[attachmentNumber];
444
- const attachmentTableItem = attachmentDetails.get(0x67f2);
445
- if (!attachmentTableItem) {
446
- throw new Error('PSTMessage::getAttachment attachmentTableItem is null');
447
- }
448
- const descriptorItemId = attachmentTableItem.entryValueReference;
449
- if (!descriptorItemId) {
450
- throw new Error('PSTMessage::getAttachment descriptorItemId is null');
451
- }
452
- // get the local descriptor for the attachmentDetails table.
453
- const descriptorItem = this.localDescriptorItems.get(descriptorItemId);
454
- if (!descriptorItem) {
455
- throw new Error('PSTMessage::getAttachment descriptorItem is null');
456
- }
457
- // try and decode it
458
- const attachmentData = descriptorItem.getData();
459
- if (attachmentData != null && attachmentData.length > 0) {
460
- const attachmentDetailsTable = new PSTTableBC_class_1.PSTTableBC(new PSTNodeInputStream_class_1.PSTNodeInputStream(this.pstFile, descriptorItem));
461
- // create our all-precious attachment object.
462
- // note that all the information that was in the c7 table is
463
- // repeated in the eb table in attachment data.
464
- // so no need to pass it...
465
- let attachmentDescriptorItems = new Map();
466
- if (descriptorItem.subNodeOffsetIndexIdentifier > 0) {
467
- attachmentDescriptorItems = this.pstFile.getPSTDescriptorItems(long.fromNumber(descriptorItem.subNodeOffsetIndexIdentifier));
468
- }
469
- return new PSTAttachment_class_1.PSTAttachment(this.pstFile, attachmentDetailsTable, attachmentDescriptorItems);
470
- }
471
- throw new Error('PSTMessage::getAttachment unable to fetch attachment number ' +
472
- attachmentNumber +
473
- ', unable to read attachment details table');
474
- }
475
- /*
476
- Miscellaneous properties
477
- */
478
- /**
479
- * Importance of email (sender determined)
480
- * https://msdn.microsoft.com/en-us/library/cc815346(v=office.12).aspx
481
- * @readonly
482
- * @type {number}
483
- * @memberof PSTMessage
484
- */
485
- get importance() {
486
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_IMPORTANCE, PSTMessage.IMPORTANCE_NORMAL);
487
- }
488
- /**
489
- * Contains a text string that identifies the sender-defined message class, such as IPM.Note.
490
- * https://msdn.microsoft.com/en-us/library/office/cc765765.aspx
491
- * @readonly
492
- * @type {string}
493
- * @memberof PSTMessage
494
- */
495
- get messageClass() {
496
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_CLASS);
497
- }
498
- /**
499
- * Contains the full subject of a message.
500
- * https://technet.microsoft.com/en-us/library/cc815720
501
- * @readonly
502
- * @type {string}
503
- * @memberof PSTMessage
504
- */
505
- get subject() {
506
- let subject = this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SUBJECT);
507
- if (subject != null &&
508
- subject.length >= 2 &&
509
- subject.charCodeAt(0) == 0x01) {
510
- if (subject.length == 2) {
511
- subject = '';
512
- }
513
- else {
514
- subject = subject.substring(2, subject.length);
515
- }
516
- }
517
- return subject;
518
- }
519
- /**
520
- * Contains the date and time the message sender submitted a message.
521
- * https://technet.microsoft.com/en-us/library/cc839781
522
- * @readonly
523
- * @type {Date}
524
- * @memberof PSTMessage
525
- */
526
- get clientSubmitTime() {
527
- return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_CLIENT_SUBMIT_TIME);
528
- }
529
- /**
530
- * Contains the display name of the messaging user who receives the message.
531
- * https://msdn.microsoft.com/en-us/library/office/cc840015.aspx
532
- * @readonly
533
- * @type {string}
534
- * @memberof PSTMessage
535
- */
536
- get receivedByName() {
537
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RECEIVED_BY_NAME);
538
- }
539
- /**
540
- * Contains the display name for the messaging user represented by the sender.
541
- * https://msdn.microsoft.com/en-us/library/office/cc842405.aspx
542
- * @readonly
543
- * @type {string}
544
- * @memberof PSTMessage
545
- */
546
- get sentRepresentingName() {
547
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_NAME);
548
- }
549
- /**
550
- * Contains the address type for the messaging user who is represented by the sender.
551
- * https://msdn.microsoft.com/en-us/library/office/cc839677.aspx
552
- * @readonly
553
- * @type {string}
554
- * @memberof PSTMessage
555
- */
556
- get sentRepresentingAddressType() {
557
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_ADDRTYPE);
558
- }
559
- /**
560
- * Contains the e-mail address for the messaging user who is represented by the sender.
561
- * https://msdn.microsoft.com/en-us/library/office/cc839552.aspx
562
- * @readonly
563
- * @type {string}
564
- * @memberof PSTMessage
565
- */
566
- get sentRepresentingEmailAddress() {
567
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_EMAIL_ADDRESS);
568
- }
569
- /**
570
- * Contains the topic of the first message in a conversation thread.
571
- * https://technet.microsoft.com/en-us/windows/cc839841
572
- * @readonly
573
- * @type {string}
574
- * @memberof PSTMessage
575
- */
576
- get conversationTopic() {
577
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_CONVERSATION_TOPIC);
578
- }
579
- /**
580
- * Contains the e-mail address type, such as SMTP, for the messaging user who actually receives the message.
581
- * https://technet.microsoft.com/en-us/library/cc765641(v=office.14)
582
- * @readonly
583
- * @type {string}
584
- * @memberof PSTMessage
585
- */
586
- get receivedByAddressType() {
587
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RECEIVED_BY_ADDRTYPE);
588
- }
589
- /**
590
- * Contains the e-mail address for the messaging user who receives the message.
591
- * https://technet.microsoft.com/en-us/library/cc839550(v=office.14)
592
- * @readonly
593
- * @type {string}
594
- * @memberof PSTMessage
595
- */
596
- get receivedByAddress() {
597
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RECEIVED_BY_EMAIL_ADDRESS);
598
- }
599
- /**
600
- * Contains transport-specific message envelope information.
601
- * https://technet.microsoft.com/en-us/library/cc815628
602
- * @readonly
603
- * @type {string}
604
- * @memberof PSTMessage
605
- */
606
- get transportMessageHeaders() {
607
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_TRANSPORT_MESSAGE_HEADERS);
608
- }
609
- // Acknowledgment mode Integer 32-bit signed
610
- get acknowledgementMode() {
611
- return this.getIntItem(0x0001);
612
- }
613
- /**
614
- * Contains TRUE if a message sender requests a delivery report for a particular recipient from the messaging system before the message is placed in the message store.
615
- * https://msdn.microsoft.com/en-us/library/office/cc765845.aspx
616
- * @readonly
617
- * @type {boolean}
618
- * @memberof PSTMessage
619
- */
620
- get originatorDeliveryReportRequested() {
621
- return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED) != 0);
622
- }
623
- /**
624
- * Contains the relative priority of a message.
625
- * https://msdn.microsoft.com/en-us/library/office/cc765646.aspx
626
- * @readonly
627
- * @type {number}
628
- * @memberof PSTMessage
629
- */
630
- get priority() {
631
- return this.getIntItem(0x0026);
632
- }
633
- /**
634
- * Contains TRUE if a message sender wants the messaging system to generate a read report when the recipient has read a message.
635
- * https://msdn.microsoft.com/en-us/library/office/cc842094.aspx
636
- * @readonly
637
- * @type {boolean}
638
- * @memberof PSTMessage
639
- */
640
- get readReceiptRequested() {
641
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_READ_RECEIPT_REQUESTED) != 0;
642
- }
643
- /**
644
- * Specifies whether adding additional recipients, when forwarding the message, is prohibited for the e-mail message.
645
- * https://msdn.microsoft.com/en-us/library/office/cc979216.aspx
646
- * @readonly
647
- * @type {boolean}
648
- * @memberof PSTMessage
649
- */
650
- get recipientReassignmentProhibited() {
651
- return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RECIPIENT_REASSIGNMENT_PROHIBITED) !=
652
- 0);
653
- }
654
- /**
655
- * Contains the sensitivity value assigned by the sender of the first version of a message that is, the message before being forwarded or replied to.
656
- * https://msdn.microsoft.com/en-us/library/cc839694(office.12).aspx
657
- * @readonly
658
- * @type {number}
659
- * @memberof PSTMessage
660
- */
661
- get originalSensitivity() {
662
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_SENSITIVITY);
663
- }
664
- /**
665
- * Contains a value that indicates the message sender's opinion of the sensitivity of a message.
666
- * https://msdn.microsoft.com/en-us/library/office/cc839518.aspx
667
- * @readonly
668
- * @type {number}
669
- * @memberof PSTMessage
670
- */
671
- get sensitivity() {
672
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_SENSITIVITY);
673
- }
674
- /**
675
- * Contains the search key for the messaging user represented by the sender.
676
- * https://msdn.microsoft.com/en-us/magazine/cc842068.aspx
677
- * @readonly
678
- * @type {Buffer}
679
- * @memberof PSTMessage
680
- */
681
- get pidTagSentRepresentingSearchKey() {
682
- return this.getBinaryItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_SEARCH_KEY);
683
- }
684
- /**
685
- * Contains the display name for the messaging user who is represented by the receiving user.
686
- * https://technet.microsoft.com/en-us/library/cc842260.aspx
687
- * @readonly
688
- * @type {string}
689
- * @memberof PSTMessage
690
- */
691
- get rcvdRepresentingName() {
692
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RCVD_REPRESENTING_NAME);
693
- }
694
- /**
695
- * Contains the subject of an original message for use in a report about the message.
696
- * https://msdn.microsoft.com/en-us/library/office/cc842182.aspx
697
- * @readonly
698
- * @type {string}
699
- * @memberof PSTMessage
700
- */
701
- get originalSubject() {
702
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_SUBJECT);
703
- }
704
- /**
705
- * Contains a list of display names for recipients that are to get a reply.
706
- * https://msdn.microsoft.com/en-us/library/windows/desktop/cc815850.aspx
707
- * @readonly
708
- * @type {string}
709
- * @memberof PSTMessage
710
- */
711
- get replyRecipientNames() {
712
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_REPLY_RECIPIENT_NAMES);
713
- }
714
- /**
715
- * Contains TRUE if this messaging user is specifically named as a primary (To) recipient of this message and is not part of a distribution list.
716
- * https://technet.microsoft.com/en-us/library/cc815755
717
- * @readonly
718
- * @type {boolean}
719
- * @memberof PSTMessage
720
- */
721
- get messageToMe() {
722
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_TO_ME) != 0;
723
- }
724
- /**
725
- * Contains TRUE if this messaging user is specifically named as a carbon copy (CC) recipient of this message and is not part of a distribution list.
726
- * https://msdn.microsoft.com/en-us/library/office/cc839713.aspx
727
- * @readonly
728
- * @type {boolean}
729
- * @memberof PSTMessage
730
- */
731
- get messageCcMe() {
732
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_CC_ME) != 0;
733
- }
734
- /**
735
- * Contains TRUE if this messaging user is specifically named as a primary (To), carbon copy (CC), or blind carbon copy (BCC) recipient of this message and is not part of a distribution list.
736
- * https://msdn.microsoft.com/en-us/library/office/cc842268.aspx
737
- * @readonly
738
- * @type {boolean}
739
- * @memberof PSTMessage
740
- */
741
- get messageRecipMe() {
742
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_RECIP_ME) != 0;
743
- }
744
- /**
745
- * Contains TRUE if the message sender wants a response to a meeting request.
746
- * https://msdn.microsoft.com/en-us/library/office/cc839921.aspx
747
- * @readonly
748
- * @type {boolean}
749
- * @memberof PSTMessage
750
- */
751
- get responseRequested() {
752
- return this.getBooleanItem(OutlookProperties_1.OutlookProperties.PR_RESPONSE_REQUESTED);
753
- }
754
- /**
755
- * Contains the display names of any carbon copy (CC) recipients of the original message.
756
- * https://msdn.microsoft.com/en-us/magazine/cc815841(v=office.14).aspx
757
- * @readonly
758
- * @type {string}
759
- * @memberof PSTMessage
760
- */
761
- get originalDisplayBcc() {
762
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_DISPLAY_BCC);
763
- }
764
- /**
765
- * Contains the display names of any carbon copy (CC) recipients of the original message.
766
- * https://msdn.microsoft.com/en-us/magazine/cc815841(v=office.14).aspx
767
- * @readonly
768
- * @type {string}
769
- * @memberof PSTMessage
770
- */
771
- get originalDisplayCc() {
772
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_DISPLAY_CC);
773
- }
774
- /**
775
- * Contains the display names of the primary (To) recipients of the original message.
776
- * https://msdn.microsoft.com/en-us/magazine/cc842235(v=office.14).aspx
777
- * @readonly
778
- * @type {string}
779
- * @memberof PSTMessage
780
- */
781
- get originalDisplayTo() {
782
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_DISPLAY_TO);
783
- }
784
- /**
785
- * Contains the address type for the messaging user who is represented by the user actually receiving the message.
786
- * https://msdn.microsoft.com/en-us/library/office/cc842447.aspx
787
- * @readonly
788
- * @type {string}
789
- * @memberof PSTMessage
790
- */
791
- get rcvdRepresentingAddrtype() {
792
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RCVD_REPRESENTING_ADDRTYPE);
793
- }
794
- /**
795
- * Contains the e-mail address for the messaging user who is represented by the receiving user.
796
- * https://msdn.microsoft.com/en-us/library/office/cc815875.aspx
797
- * @readonly
798
- * @type {string}
799
- * @memberof PSTMessage
800
- */
801
- get rcvdRepresentingEmailAddress() {
802
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RCVD_REPRESENTING_EMAIL_ADDRESS);
803
- }
804
- /**
805
- * Contains TRUE if a message sender requests a reply from a recipient.
806
- * https://msdn.microsoft.com/en-us/library/office/cc815286.aspx
807
- * @readonly
808
- * @type {boolean}
809
- * @memberof PSTMessage
810
- */
811
- get isReplyRequested() {
812
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_REPLY_REQUESTED) != 0;
813
- }
814
- /**
815
- * Contains the message sender's entry identifier.
816
- * https://msdn.microsoft.com/en-us/library/office/cc815625.aspx
817
- * @readonly
818
- * @type {Buffer}
819
- * @memberof PSTMessage
820
- */
821
- get senderEntryId() {
822
- return this.getBinaryItem(OutlookProperties_1.OutlookProperties.PR_SENDER_ENTRYID);
823
- }
824
- /**
825
- * Contains the message sender's display name.
826
- * https://msdn.microsoft.com/en-us/library/office/cc815457.aspx
827
- * @readonly
828
- * @type {string}
829
- * @memberof PSTMessage
830
- */
831
- get senderName() {
832
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENDER_NAME);
833
- }
834
- /**
835
- * Contains the message sender's e-mail address type.
836
- * https://msdn.microsoft.com/en-us/library/office/cc815748.aspx
837
- * @readonly
838
- * @type {string}
839
- * @memberof PSTMessage
840
- */
841
- get senderAddrtype() {
842
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENDER_ADDRTYPE);
843
- }
844
- /**
845
- * Contains the message sender's e-mail address.
846
- * https://msdn.microsoft.com/en-us/library/office/cc839670.aspx
847
- * @readonly
848
- * @type {string}
849
- * @memberof PSTMessage
850
- */
851
- get senderEmailAddress() {
852
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENDER_EMAIL_ADDRESS);
853
- }
854
- /**
855
- * Contains the sum, in bytes, of the sizes of all properties on a message object
856
- * https://technet.microsoft.com/en-us/library/cc842471
857
- * @readonly
858
- * @type {long}
859
- * @memberof PSTMessage
860
- */
861
- get messageSize() {
862
- return this.getLongItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_SIZE);
863
- }
864
- /**
865
- * A number associated with an item in a message store.
866
- * https://msdn.microsoft.com/en-us/library/office/cc815718.aspx
867
- * @readonly
868
- * @type {number}
869
- * @memberof PSTMessage
870
- */
871
- get internetArticleNumber() {
872
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_INTERNET_ARTICLE_NUMBER);
873
- }
874
- /**
875
- * Contains a string that names the first server that is used to send the message.
876
- * https://msdn.microsoft.com/en-us/library/office/cc815413.aspx
877
- * @readonly
878
- * @type {string}
879
- * @memberof PSTMessage
880
- */
881
- get primarySendAccount() {
882
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_PRIMARY_SEND_ACCOUNT);
883
- }
884
- /**
885
- * Specifies the server that a client is currently attempting to use to send e-mail.
886
- * https://technet.microsoft.com/en-us/library/cc842327(v=office.14)
887
- * @readonly
888
- * @type {string}
889
- * @memberof PSTMessage
890
- */
891
- get nextSendAcct() {
892
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_NEXT_SEND_ACCT);
893
- }
894
- /**
895
- * Contains the type of an object.
896
- * https://msdn.microsoft.com/en-us/library/office/cc815487.aspx
897
- * @readonly
898
- * @type {number}
899
- * @memberof PSTMessage
900
- */
901
- get objectType() {
902
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_OBJECT_TYPE);
903
- }
904
- /**
905
- * Contains TRUE if a client application wants MAPI to delete the associated message after submission.
906
- * https://msdn.microsoft.com/en-us/library/office/cc842353.aspx
907
- * @readonly
908
- * @type {boolean}
909
- * @memberof PSTMessage
910
- */
911
- get deleteAfterSubmit() {
912
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_DELETE_AFTER_SUBMIT) != 0;
913
- }
914
- /**
915
- * Contains TRUE if some transport provider has already accepted responsibility for delivering the message to this recipient, and FALSE if the MAPI spooler considers that this transport provider should accept responsibility.
916
- * https://msdn.microsoft.com/en-us/library/office/cc765767.aspx
917
- * @readonly
918
- * @type {boolean}
919
- * @memberof PSTMessage
920
- */
921
- get responsibility() {
922
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RESPONSIBILITY) != 0;
923
- }
924
- /**
925
- * Contains TRUE if the PR_RTF_COMPRESSED (PidTagRtfCompressed) property has the same text content as the PR_BODY (PidTagBody) property for this message.
926
- * https://msdn.microsoft.com/en-us/library/office/cc765844.aspx
927
- * @readonly
928
- * @type {boolean}
929
- * @memberof PSTMessage
930
- */
931
- get isRTFInSync() {
932
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_IN_SYNC) != 0;
933
- }
934
- /**
935
- * Contains an ASCII list of the display names of any blind carbon copy (BCC) message recipients, separated by semicolons (;).
936
- * https://msdn.microsoft.com/en-us/library/office/cc815730.aspx
937
- * @readonly
938
- * @type {string}
939
- * @memberof PSTMessage
940
- */
941
- get displayBCC() {
942
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_DISPLAY_BCC);
943
- }
944
- /**
945
- * Contains an ASCII list of the display names of any carbon copy (CC) message recipients, separated by semicolons (;).
946
- * https://msdn.microsoft.com/en-us/library/office/cc765528.aspx
947
- * @readonly
948
- * @type {string}
949
- * @memberof PSTMessage
950
- */
951
- get displayCC() {
952
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_DISPLAY_CC);
953
- }
954
- /**
955
- * Contains a list of the display names of the primary (To) message recipients, separated by semicolons (;).
956
- * https://msdn.microsoft.com/en-us/library/office/cc839687.aspx
957
- * @readonly
958
- * @type {string}
959
- * @memberof PSTMessage
960
- */
961
- get displayTo() {
962
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_DISPLAY_TO);
963
- }
964
- /**
965
- * Contains the date and time when a message was delivered.
966
- * https://msdn.microsoft.com/en-us/library/office/cc841961.aspx
967
- * @readonly
968
- * @type {Date}
969
- * @memberof PSTMessage
970
- */
971
- get messageDeliveryTime() {
972
- return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_DELIVERY_TIME);
973
- }
974
- /**
975
- * Corresponds to the message ID field as specified in [RFC2822].
976
- * https://msdn.microsoft.com/en-us/library/office/cc839521.aspx
977
- * @readonly
978
- * @type {string}
979
- * @memberof PSTMessage
980
- */
981
- get internetMessageId() {
982
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_INTERNET_MESSAGE_ID);
983
- }
984
- /**
985
- * Contains the original message's PR_INTERNET_MESSAGE_ID (PidTagInternetMessageId) property value.
986
- * https://msdn.microsoft.com/en-us/library/office/cc839776.aspx
987
- * @readonly
988
- * @type {string}
989
- * @memberof PSTMessage
990
- */
991
- get inReplyToId() {
992
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_IN_REPLY_TO_ID);
993
- }
994
- /**
995
- * Contains the value of a Multipurpose Internet Mail Extensions (MIME) message's Return-Path header field. The e-mail address of the message's sender.
996
- * https://msdn.microsoft.com/en-us/library/office/cc765856.aspx
997
- * @readonly
998
- * @type {string}
999
- * @memberof PSTMessage
1000
- */
1001
- get returnPath() {
1002
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_INTERNET_RETURN_PATH);
1003
- }
1004
- /**
1005
- * Contains a number that indicates which icon to use when you display a group of e-mail objects.
1006
- * https://msdn.microsoft.com/en-us/library/office/cc815472.aspx
1007
- * @readonly
1008
- * @type {number}
1009
- * @memberof PSTMessage
1010
- */
1011
- get iconIndex() {
1012
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ICON_INDEX);
1013
- }
1014
- /**
1015
- * Contains the last verb executed.
1016
- * Todo: Helper methods for each flag.
1017
- * https://msdn.microsoft.com/en-us/library/office/cc841968.aspx
1018
- * @readonly
1019
- * @type {number}
1020
- * @memberof PSTMessage
1021
- */
1022
- get lastVerbExecuted() {
1023
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_LAST_VERB_EXECUTED);
1024
- }
1025
- /**
1026
- * Contains the time when the last verb was executed.
1027
- * https://msdn.microsoft.com/en-us/library/office/cc839918.aspx
1028
- * @readonly
1029
- * @type {Date}
1030
- * @memberof PSTMessage
1031
- */
1032
- get lastVerbExecutionTime() {
1033
- return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_LAST_VERB_EXECUTION_TIME);
1034
- }
1035
- /**
1036
- * The URL component name for a message.
1037
- * https://msdn.microsoft.com/en-us/library/office/cc815653.aspx
1038
- * @readonly
1039
- * @type {String}
1040
- * @memberof PSTMessage
1041
- */
1042
- get urlCompName() {
1043
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_URL_COMP_NAME);
1044
- }
1045
- /**
1046
- * Specifies the hide or show status of a folder.
1047
- * https://msdn.microsoft.com/en-us/library/ee159038(v=exchg.80).aspx
1048
- * @readonly
1049
- * @type {boolean}
1050
- * @memberof PSTMessage
1051
- */
1052
- get attrHidden() {
1053
- return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ATTR_HIDDEN) != 0;
1054
- }
1055
- /**
1056
- * Specifies the date on which the user expects work on the task to begin.
1057
- * https://technet.microsoft.com/en-us/library/cc815922(v=office.12).aspx
1058
- * @readonly
1059
- * @type {Date}
1060
- * @memberof PSTMessage
1061
- */
1062
- get taskStartDate() {
1063
- return this.getDateItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidTaskStartDate, PSTFile_class_1.PSTFile.PSETID_Task));
1064
- }
1065
- /**
1066
- * Represents the date when the user expects to complete the task.
1067
- * https://technet.microsoft.com/en-us/library/cc839641(v=office.12).aspx
1068
- * @readonly
1069
- * @type {Date}
1070
- * @memberof PSTMessage
1071
- */
1072
- get taskDueDate() {
1073
- return this.getDateItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidTaskDueDate, PSTFile_class_1.PSTFile.PSETID_Task));
1074
- }
1075
- /**
1076
- * Specifies whether a reminder is set on the object.
1077
- * https://msdn.microsoft.com/en-us/library/office/cc765589.aspx
1078
- * @readonly
1079
- * @type {boolean}
1080
- * @memberof PSTMessage
1081
- */
1082
- get reminderSet() {
1083
- return this.getBooleanItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidReminderSet, OutlookProperties_1.OutlookProperties.PSETID_Common));
1084
- }
1085
- /**
1086
- * Specifies the interval, in minutes, between the time when the reminder first becomes overdue and the start time of the calendar object.
1087
- * https://msdn.microsoft.com/en-us/library/office/cc765535.aspx
1088
- * @readonly
1089
- * @type {number}
1090
- * @memberof PSTMessage
1091
- */
1092
- get reminderDelta() {
1093
- return this.getIntItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidReminderDelta, OutlookProperties_1.OutlookProperties.PSETID_Common));
1094
- }
1095
- /**
1096
- * Color categories
1097
- * @readonly
1098
- * @type {string[]}
1099
- * @memberof PSTMessage
1100
- */
1101
- get colorCategories() {
1102
- const keywordCategory = PSTFile_class_1.PSTFile.getPublicStringToIdMapItem('Keywords');
1103
- const categories = [];
1104
- if (this.pstTableItems && this.pstTableItems.has(keywordCategory)) {
1105
- try {
1106
- const item = this.pstTableItems.get(keywordCategory);
1107
- if (item && item.data.length == 0) {
1108
- return [];
1109
- }
1110
- if (item) {
1111
- const categoryCount = item.data[0];
1112
- if (categoryCount > 0) {
1113
- const categories = [];
1114
- const offsets = [];
1115
- for (let x = 0; x < categoryCount; x++) {
1116
- offsets[x] = PSTUtil_class_1.PSTUtil.convertBigEndianBytesToLong(item.data, x * 4 + 1, (x + 1) * 4 + 1).toNumber();
1117
- }
1118
- for (let x = 0; x < offsets.length - 1; x++) {
1119
- const start = offsets[x];
1120
- const end = offsets[x + 1];
1121
- const length = end - start;
1122
- const buf = Buffer.alloc(length);
1123
- PSTUtil_class_1.PSTUtil.arraycopy(item.data, start, buf, 0, length);
1124
- const name = Buffer.from(buf).toString();
1125
- categories[x] = name;
1126
- }
1127
- const start = offsets[offsets.length - 1];
1128
- const end = item.data.length;
1129
- const length = end - start;
1130
- const buf = Buffer.alloc(length);
1131
- PSTUtil_class_1.PSTUtil.arraycopy(item.data, start, buf, 0, length);
1132
- const name = Buffer.from(buf).toString();
1133
- categories[categories.length - 1] = name;
1134
- }
1135
- }
1136
- }
1137
- catch (err) {
1138
- console.error('PSTMessage::colorCategories Unable to decode category data\n' + err);
1139
- throw err;
1140
- }
1141
- }
1142
- return categories;
1143
- }
1144
- /**
1145
- * Contains a computed value derived from other conversation-related properties.
1146
- * https://msdn.microsoft.com/en-us/library/ee204279(v=exchg.80).aspx
1147
- * @readonly
1148
- * @type {Buffer}
1149
- * @memberof PSTMessage
1150
- */
1151
- get conversationId() {
1152
- return this.getBinaryItem(OutlookProperties_1.OutlookProperties.PidTagConversationId);
1153
- }
1154
- /**
1155
- * Indicates whether the GUID portion of the PidTagConversationIndex property (section 2.641) is to be used to compute the PidTagConversationId property (section 2.640).
1156
- * https://msdn.microsoft.com/en-us/library/ee218393(v=exchg.80).aspx
1157
- * @readonly
1158
- * @type {boolean}
1159
- * @memberof PSTMessage
1160
- */
1161
- get isConversationIndexTracking() {
1162
- return this.getBooleanItem(OutlookProperties_1.OutlookProperties.PidTagConversationIndexTracking, false);
1163
- }
1164
- /**
1165
- * Contains the messaging user's e-mail address.
1166
- * https://msdn.microsoft.com/en-us/library/office/cc842372.aspx
1167
- * @readonly
1168
- * @type {string}
1169
- * @memberof PSTMessage
1170
- */
1171
- get emailAddress() {
1172
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_EMAIL_ADDRESS);
1173
- }
1174
- /**
1175
- * Contains the messaging user's e-mail address type, such as SMTP.
1176
- * https://msdn.microsoft.com/en-us/library/office/cc815548.aspx
1177
- * @readonly
1178
- * @type {string}
1179
- * @memberof PSTMessage
1180
- */
1181
- get addrType() {
1182
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ADDRTYPE);
1183
- }
1184
- /**
1185
- * Contains a comment about the purpose or content of an object.
1186
- * https://msdn.microsoft.com/en-us/library/office/cc842022.aspx
1187
- * @readonly
1188
- * @type {string}
1189
- * @memberof PSTMessage
1190
- */
1191
- get comment() {
1192
- return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_COMMENT);
1193
- }
1194
- /**
1195
- * Contains the creation date and time of a message.
1196
- * https://msdn.microsoft.com/en-us/library/office/cc765677.aspx
1197
- * @readonly
1198
- * @type {Date}
1199
- * @memberof PSTMessage
1200
- */
1201
- get creationTime() {
1202
- return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_CREATION_TIME);
1203
- }
1204
- /**
1205
- * Contains the date and time when the object or subobject was last modified.
1206
- * https://msdn.microsoft.com/en-us/library/office/cc815689.aspx
1207
- * @readonly
1208
- * @type {Date}
1209
- * @memberof PSTMessage
1210
- */
1211
- get modificationTime() {
1212
- return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_LAST_MODIFICATION_TIME);
1213
- }
1214
- /**
1215
- * JSON stringify the object properties. Large fields (like body) aren't included.
1216
- * @returns {string}
1217
- * @memberof PSTMessage
1218
- */
1219
- toJSON() {
1220
- const clone = Object.assign({
1221
- messageClass: this.messageClass,
1222
- emailAddress: this.emailAddress,
1223
- subject: this.subject,
1224
- addrType: this.addrType,
1225
- comment: this.comment,
1226
- creationTime: this.creationTime,
1227
- modificationTime: this.modificationTime,
1228
- importance: this.importance,
1229
- transportMessageHeaders: this.transportMessageHeaders,
1230
- clientSubmitTime: this.clientSubmitTime,
1231
- receivedByName: this.receivedByName,
1232
- sentRepresentingName: this.sentRepresentingName,
1233
- sentRepresentingAddressType: this.sentRepresentingAddressType,
1234
- sentRepresentingEmailAddress: this.sentRepresentingEmailAddress,
1235
- conversationTopic: this.conversationTopic,
1236
- receivedByAddressType: this.receivedByAddressType,
1237
- receivedByAddress: this.receivedByAddress,
1238
- isRead: this.isRead,
1239
- isUnmodified: this.isUnmodified,
1240
- isSubmitted: this.isSubmitted,
1241
- isUnsent: this.isUnsent,
1242
- hasAttachments: this.hasAttachments,
1243
- isFromMe: this.isFromMe,
1244
- isAssociated: this.isAssociated,
1245
- isResent: this.isResent,
1246
- acknowledgementMode: this.acknowledgementMode,
1247
- originatorDeliveryReportRequested: this
1248
- .originatorDeliveryReportRequested,
1249
- readReceiptRequested: this.readReceiptRequested,
1250
- recipientReassignmentProhibited: this.recipientReassignmentProhibited,
1251
- originalSensitivity: this.originalSensitivity,
1252
- sensitivity: this.sensitivity,
1253
- rcvdRepresentingName: this.rcvdRepresentingName,
1254
- bloriginalSubjectah: this.originalSubject,
1255
- replyRecipientNames: this.replyRecipientNames,
1256
- messageToMe: this.messageToMe,
1257
- messageCcMe: this.messageCcMe,
1258
- messageRecipMe: this.messageRecipMe,
1259
- responseRequested: this.responseRequested,
1260
- originalDisplayBcc: this.originalDisplayBcc,
1261
- originalDisplayCc: this.originalDisplayCc,
1262
- originalDisplayTo: this.originalDisplayTo,
1263
- rcvdRepresentingAddrtype: this.rcvdRepresentingAddrtype,
1264
- rcvdRepresentingEmailAddress: this.rcvdRepresentingEmailAddress,
1265
- isNonReceiptNotificationRequested: this
1266
- .isNonReceiptNotificationRequested,
1267
- isOriginatorNonDeliveryReportRequested: this
1268
- .isOriginatorNonDeliveryReportRequested,
1269
- recipientType: this.recipientType,
1270
- isReplyRequested: this.isReplyRequested,
1271
- senderName: this.senderName,
1272
- senderAddrtype: this.senderAddrtype,
1273
- senderEmailAddress: this.senderEmailAddress,
1274
- messageSize: this.messageSize,
1275
- internetArticleNumber: this.internetArticleNumber,
1276
- primarySendAccount: this.primarySendAccount,
1277
- nextSendAcct: this.nextSendAcct,
1278
- objectType: this.objectType,
1279
- deleteAfterSubmit: this.deleteAfterSubmit,
1280
- responsibility: this.responsibility,
1281
- isRTFInSync: this.isRTFInSync,
1282
- displayBCC: this.displayBCC,
1283
- displayCC: this.displayCC,
1284
- displayTo: this.displayTo,
1285
- messageDeliveryTime: this.messageDeliveryTime,
1286
- bodyPrefix: this.bodyPrefix,
1287
- rtfSyncBodyCRC: this.rtfSyncBodyCRC,
1288
- rtfSyncBodyCount: this.rtfSyncBodyCount,
1289
- rtfSyncBodyTag: this.rtfSyncBodyTag,
1290
- rtfSyncPrefixCount: this.rtfSyncPrefixCount,
1291
- rtfSyncTrailingCount: this.rtfSyncTrailingCount,
1292
- internetMessageId: this.internetMessageId,
1293
- inReplyToId: this.inReplyToId,
1294
- returnPath: this.returnPath,
1295
- iconIndex: this.iconIndex,
1296
- lastVerbExecutionTime: this.lastVerbExecutionTime,
1297
- urlCompName: this.urlCompName,
1298
- attrHidden: this.attrHidden,
1299
- numberOfRecipients: this.numberOfRecipients,
1300
- taskStartDate: this.taskStartDate,
1301
- taskDueDate: this.taskDueDate,
1302
- reminderSet: this.reminderSet,
1303
- reminderDelta: this.reminderDelta,
1304
- colorCategories: this.colorCategories,
1305
- numberOfAttachments: this.numberOfAttachments,
1306
- conversationId: this.conversationId,
1307
- isConversationIndexTracking: this.isConversationIndexTracking,
1308
- recipientTable: this.recipientTable,
1309
- }, this);
1310
- return clone;
1311
- }
1312
- }
1313
- exports.PSTMessage = PSTMessage;
1314
- PSTMessage.IMPORTANCE_LOW = 0;
1315
- PSTMessage.IMPORTANCE_NORMAL = 1;
1316
- PSTMessage.IMPORTANCE_HIGH = 2;
1317
- PSTMessage.RECIPIENT_TYPE_TO = 1;
1318
- PSTMessage.RECIPIENT_TYPE_CC = 2;
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.PSTMessage = void 0;
7
+ /* eslint-disable @typescript-eslint/no-explicit-any */
8
+ const long_1 = __importDefault(require("long"));
9
+ const OutlookProperties_1 = require("./OutlookProperties");
10
+ const PSTFile_class_1 = require("./PSTFile.class");
11
+ const PSTNodeInputStream_class_1 = require("./PSTNodeInputStream.class");
12
+ const PSTObject_class_1 = require("./PSTObject.class");
13
+ const PSTTable7C_class_1 = require("./PSTTable7C.class");
14
+ const PSTTableBC_class_1 = require("./PSTTableBC.class");
15
+ const PSTUtil_class_1 = require("./PSTUtil.class");
16
+ const LZFu_class_1 = require("./LZFu.class");
17
+ const PSTAttachment_class_1 = require("./PSTAttachment.class");
18
+ const PSTRecipient_class_1 = require("./PSTRecipient.class");
19
+ var PidTagMessageFlags;
20
+ (function (PidTagMessageFlags) {
21
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_READ"] = 1] = "MSGFLAG_READ";
22
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_UNMODIFIED"] = 2] = "MSGFLAG_UNMODIFIED";
23
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_SUBMIT"] = 4] = "MSGFLAG_SUBMIT";
24
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_UNSENT"] = 8] = "MSGFLAG_UNSENT";
25
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_HASATTACH"] = 16] = "MSGFLAG_HASATTACH";
26
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_FROMME"] = 32] = "MSGFLAG_FROMME";
27
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_ASSOCIATED"] = 64] = "MSGFLAG_ASSOCIATED";
28
+ PidTagMessageFlags[PidTagMessageFlags["MSGFLAG_RESEND"] = 128] = "MSGFLAG_RESEND";
29
+ })(PidTagMessageFlags || (PidTagMessageFlags = {}));
30
+ class PSTMessage extends PSTObject_class_1.PSTObject {
31
+ /**
32
+ * Creates an instance of PSTMessage. PST Message contains functions that are common across most MAPI objects.
33
+ * Note that many of these functions may not be applicable for the item in question,
34
+ * however there seems to be no hard and fast outline for what properties apply to which
35
+ * objects. For properties where no value is set, a blank value is returned (rather than
36
+ * an exception being raised).
37
+ * @param {PSTFile} pstFile
38
+ * @param {DescriptorIndexNode} descriptorIndexNode
39
+ * @param {PSTTableBC} [table]
40
+ * @param {Map<number, PSTDescriptorItem>} [localDescriptorItems]
41
+ * @memberof PSTMessage
42
+ */
43
+ constructor(pstFile, descriptorIndexNode, pstTableBC, localDescriptorItems) {
44
+ super(pstFile, descriptorIndexNode);
45
+ this.recipientTable = null;
46
+ this.attachmentTable = null;
47
+ if (pstTableBC) {
48
+ // pre-populate folder object with values
49
+ this.prePopulate(descriptorIndexNode, pstTableBC, localDescriptorItems);
50
+ }
51
+ }
52
+ /*
53
+ PidTagMessageFlags
54
+ https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
55
+ */
56
+ /**
57
+ * The message is marked as having been read.
58
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
59
+ * @readonly
60
+ * @type {boolean}
61
+ * @memberof PSTMessage
62
+ */
63
+ get isRead() {
64
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
65
+ PidTagMessageFlags.MSGFLAG_READ) !=
66
+ 0);
67
+ }
68
+ /**
69
+ * The outgoing message has not been modified since the first time that it was saved; the incoming message has not been modified since it was delivered.
70
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
71
+ * @readonly
72
+ * @type {boolean}
73
+ * @memberof PSTMessage
74
+ */
75
+ get isUnmodified() {
76
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
77
+ PidTagMessageFlags.MSGFLAG_UNMODIFIED) !=
78
+ 0);
79
+ }
80
+ /**
81
+ * The message is marked for sending as a result of a call to the RopSubmitMessage ROP
82
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
83
+ * @readonly
84
+ * @type {boolean}
85
+ * @memberof PSTMessage
86
+ */
87
+ get isSubmitted() {
88
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
89
+ PidTagMessageFlags.MSGFLAG_SUBMIT) !=
90
+ 0);
91
+ }
92
+ /**
93
+ * The message is still being composed. It is saved, but has not been sent.
94
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
95
+ * @readonly
96
+ * @type {boolean}
97
+ * @memberof PSTMessage
98
+ */
99
+ get isUnsent() {
100
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
101
+ PidTagMessageFlags.MSGFLAG_UNSENT) !=
102
+ 0);
103
+ }
104
+ /**
105
+ * The message has at least one attachment.
106
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
107
+ * @readonly
108
+ * @type {boolean}
109
+ * @memberof PSTMessage
110
+ */
111
+ get hasAttachments() {
112
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
113
+ PidTagMessageFlags.MSGFLAG_HASATTACH) !=
114
+ 0);
115
+ }
116
+ /**
117
+ * The user receiving the message was also the user who sent the message.
118
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
119
+ * @readonly
120
+ * @type {boolean}
121
+ * @memberof PSTMessage
122
+ */
123
+ get isFromMe() {
124
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
125
+ PidTagMessageFlags.MSGFLAG_FROMME) !=
126
+ 0);
127
+ }
128
+ /**
129
+ * The message is an FAI message. An FAI Message object is used to store a variety of settings and
130
+ * auxiliary data, including forms, views, calendar options, favorites, and category lists.
131
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
132
+ * @readonly
133
+ * @type {boolean}
134
+ * @memberof PSTMessage
135
+ */
136
+ get isAssociated() {
137
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
138
+ PidTagMessageFlags.MSGFLAG_ASSOCIATED) !=
139
+ 0);
140
+ }
141
+ /**
142
+ * The message includes a request for a resend operation with a nondelivery report.
143
+ * https://msdn.microsoft.com/en-us/library/ee160304(v=exchg.80).aspx
144
+ * @readonly
145
+ * @type {boolean}
146
+ * @memberof PSTMessage
147
+ */
148
+ get isResent() {
149
+ return ((this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_FLAGS) &
150
+ PidTagMessageFlags.MSGFLAG_RESEND) !=
151
+ 0);
152
+ }
153
+ /*
154
+ Recipients
155
+ */
156
+ /**
157
+ * Find, extract and load up all of the attachments in this email
158
+ * @private
159
+ * @memberof PSTMessage
160
+ */
161
+ processRecipients() {
162
+ try {
163
+ const recipientTableKey = 0x0692;
164
+ if (this.recipientTable == null &&
165
+ this.localDescriptorItems != null &&
166
+ this.localDescriptorItems.has(recipientTableKey)) {
167
+ const item = this.localDescriptorItems.get(recipientTableKey);
168
+ let descriptorItems = new Map();
169
+ if (item && item.subNodeOffsetIndexIdentifier > 0) {
170
+ descriptorItems = this.pstFile.getPSTDescriptorItems(long_1.default.fromNumber(item.subNodeOffsetIndexIdentifier));
171
+ }
172
+ this.recipientTable = new PSTTable7C_class_1.PSTTable7C(new PSTNodeInputStream_class_1.PSTNodeInputStream(this.pstFile, item), descriptorItems);
173
+ }
174
+ }
175
+ catch (err) {
176
+ console.error('PSTMessage::processRecipients\n' + err);
177
+ this.recipientTable = null;
178
+ }
179
+ }
180
+ /**
181
+ * Get the recipients table.
182
+ * @readonly
183
+ * @type {number}
184
+ * @memberof PSTMessage
185
+ */
186
+ get numberOfRecipients() {
187
+ if (this.recipientTable === null) {
188
+ this.processRecipients();
189
+ }
190
+ return this.recipientTable ? this.recipientTable.rowCount : 0;
191
+ }
192
+ /**
193
+ * Get specific recipient.
194
+ * @param {number} recipientNumber
195
+ * @returns {PSTRecipient}
196
+ * @memberof PSTMessage
197
+ */
198
+ getRecipient(recipientNumber) {
199
+ if (!this.recipientTable) {
200
+ this.processRecipients();
201
+ }
202
+ if (!this.recipientTable) {
203
+ throw new Error('PSTMessage::getRecipient recipientTable is null');
204
+ }
205
+ if (recipientNumber >= this.numberOfRecipients ||
206
+ recipientNumber >= this.recipientTable.getItems().length) {
207
+ throw new Error('PSTMessage::getRecipient unable to fetch recipient number ' +
208
+ recipientNumber);
209
+ }
210
+ const recipientDetails = this.recipientTable.getItems()[recipientNumber];
211
+ return recipientDetails
212
+ ? new PSTRecipient_class_1.PSTRecipient(this.pstFile, recipientDetails)
213
+ : null;
214
+ }
215
+ /**
216
+ * Contains TRUE if a message sender wants notification of non-receipt for a specified recipient.
217
+ * https://msdn.microsoft.com/en-us/library/office/cc979208.aspx
218
+ * @readonly
219
+ * @type {boolean}
220
+ * @memberof PSTMessage
221
+ */
222
+ get isNonReceiptNotificationRequested() {
223
+ return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_NON_RECEIPT_NOTIFICATION_REQUESTED) != 0);
224
+ }
225
+ /**
226
+ * Contains TRUE if a message sender wants notification of non-deliver for a specified recipient.
227
+ * https://msdn.microsoft.com/en-us/library/ms987568(v=exchg.65).aspx
228
+ * @readonly
229
+ * @type {boolean}
230
+ * @memberof PSTMessage
231
+ */
232
+ get isOriginatorNonDeliveryReportRequested() {
233
+ return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ORIGINATOR_NON_DELIVERY_REPORT_REQUESTED) != 0);
234
+ }
235
+ /**
236
+ * Contains the recipient type for a message recipient.
237
+ * https://msdn.microsoft.com/en-us/library/office/cc839620.aspx
238
+ * @readonly
239
+ * @type {number}
240
+ * @memberof PSTMessage
241
+ */
242
+ get recipientType() {
243
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RECIPIENT_TYPE);
244
+ }
245
+ /*
246
+ Body (plain text, RTF, HTML)
247
+ */
248
+ /**
249
+ * Plain text message body.
250
+ * https://msdn.microsoft.com/en-us/library/office/cc765874.aspx
251
+ * @readonly
252
+ * @type {string}
253
+ * @memberof PSTMessage
254
+ */
255
+ get body() {
256
+ const codepage = this.getCodepage();
257
+ if (codepage) {
258
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY, 0, codepage);
259
+ }
260
+ else {
261
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY);
262
+ }
263
+ }
264
+ /**
265
+ * Plain text body prefix.
266
+ * @readonly
267
+ * @type {string}
268
+ * @memberof PSTMessage
269
+ */
270
+ get bodyPrefix() {
271
+ return this.getStringItem(0x6619);
272
+ }
273
+ /**
274
+ * Contains the Rich Text Format (RTF) version of the message text, usually in compressed form.
275
+ * https://technet.microsoft.com/en-us/library/cc815911
276
+ * @readonly
277
+ * @type {string}
278
+ * @memberof PSTMessage
279
+ */
280
+ get bodyRTF() {
281
+ // do we have an entry for it?
282
+ if (this.pstTableItems && this.pstTableItems.has(0x1009)) {
283
+ // is it a reference?
284
+ const item = this.pstTableItems.get(0x1009);
285
+ if (item && item.data.length > 0) {
286
+ return LZFu_class_1.LZFu.decode(item.data);
287
+ }
288
+ const ref = item ? item.entryValueReference : null;
289
+ if (ref) {
290
+ const descItem = this.localDescriptorItems
291
+ ? this.localDescriptorItems.get(ref)
292
+ : null;
293
+ if (descItem != null) {
294
+ return LZFu_class_1.LZFu.decode(descItem.getData());
295
+ }
296
+ }
297
+ }
298
+ return '';
299
+ }
300
+ /**
301
+ * Contains the cyclical redundancy check (CRC) computed for the message text.
302
+ * https://technet.microsoft.com/en-us/library/cc815532(v=office.15).aspx
303
+ * @readonly
304
+ * @type {number}
305
+ * @memberof PSTMessage
306
+ */
307
+ get rtfSyncBodyCRC() {
308
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_BODY_CRC);
309
+ }
310
+ /**
311
+ * Contains a count of the significant characters of the message text.
312
+ * https://msdn.microsoft.com/en-us/library/windows/desktop/cc842324.aspx
313
+ * @readonly
314
+ * @type {number}
315
+ * @memberof PSTMessage
316
+ */
317
+ get rtfSyncBodyCount() {
318
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_BODY_COUNT);
319
+ }
320
+ /**
321
+ * Contains significant characters that appear at the beginning of the message text.
322
+ * https://technet.microsoft.com/en-us/library/cc815400(v=office.15).aspx
323
+ * @readonly
324
+ * @type {string}
325
+ * @memberof PSTMessage
326
+ */
327
+ get rtfSyncBodyTag() {
328
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_BODY_TAG);
329
+ }
330
+ /**
331
+ * Contains a count of the ignorable characters that appear before the significant characters of the message.
332
+ * https://msdn.microsoft.com/en-us/magazine/cc842437.aspx
333
+ * @readonly
334
+ * @type {number}
335
+ * @memberof PSTMessage
336
+ */
337
+ get rtfSyncPrefixCount() {
338
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_PREFIX_COUNT);
339
+ }
340
+ /**
341
+ * Contains a count of the ignorable characters that appear after the significant characters of the message.
342
+ * https://msdn.microsoft.com/en-us/magazine/cc765795.aspx
343
+ * @readonly
344
+ * @type {number}
345
+ * @memberof PSTMessage
346
+ */
347
+ get rtfSyncTrailingCount() {
348
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_SYNC_TRAILING_COUNT);
349
+ }
350
+ /**
351
+ * Gets codepage to use.
352
+ * TODO - does this work?
353
+ * @private
354
+ * @returns {(string | null | undefined)}
355
+ * @memberof PSTMessage
356
+ */
357
+ getCodepage() {
358
+ let cpItem = this.pstTableItems
359
+ ? this.pstTableItems.get(OutlookProperties_1.OutlookProperties.PR_INTERNET_CPID)
360
+ : null;
361
+ if (cpItem == null) {
362
+ cpItem = this.pstTableItems
363
+ ? this.pstTableItems.get(OutlookProperties_1.OutlookProperties.PR_MESSAGE_CODEPAGE)
364
+ : null;
365
+ }
366
+ if (cpItem != null) {
367
+ return PSTUtil_class_1.PSTUtil.getInternetCodePageCharset(cpItem.entryValueReference);
368
+ }
369
+ return null;
370
+ }
371
+ /**
372
+ * Contains the HTML version of the message text.
373
+ * @readonly
374
+ * @type {string}
375
+ * @memberof PSTMessage
376
+ */
377
+ get bodyHTML() {
378
+ const codepage = this.getCodepage();
379
+ if (codepage) {
380
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY_HTML, 0, codepage);
381
+ }
382
+ else {
383
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_BODY_HTML);
384
+ }
385
+ }
386
+ /*
387
+ Attachments
388
+ */
389
+ /**
390
+ * Processes table which holds attachments.
391
+ * @private
392
+ * @memberof PSTMessage
393
+ */
394
+ processAttachments() {
395
+ const attachmentTableKey = 0x0671;
396
+ if (this.attachmentTable == null &&
397
+ this.localDescriptorItems != null &&
398
+ this.localDescriptorItems.has(attachmentTableKey)) {
399
+ const item = this.localDescriptorItems.get(attachmentTableKey);
400
+ let descriptorItems = new Map();
401
+ if (item && item.subNodeOffsetIndexIdentifier > 0) {
402
+ descriptorItems = this.pstFile.getPSTDescriptorItems(long_1.default.fromValue(item.subNodeOffsetIndexIdentifier));
403
+ }
404
+ this.attachmentTable = new PSTTable7C_class_1.PSTTable7C(new PSTNodeInputStream_class_1.PSTNodeInputStream(this.pstFile, item), descriptorItems);
405
+ }
406
+ }
407
+ /**
408
+ * Number of attachments by counting rows in attachment table.
409
+ * @readonly
410
+ * @type {number}
411
+ * @memberof PSTMessage
412
+ */
413
+ get numberOfAttachments() {
414
+ try {
415
+ this.processAttachments();
416
+ }
417
+ catch (err) {
418
+ console.error('PSTMessage::numberOfAttachments\n' + err);
419
+ return 0;
420
+ }
421
+ return this.attachmentTable ? this.attachmentTable.rowCount : 0;
422
+ }
423
+ /**
424
+ * Get specific attachment from table using index.
425
+ * @param {number} attachmentNumber
426
+ * @returns {PSTAttachment}
427
+ * @memberof PSTMessage
428
+ */
429
+ getAttachment(attachmentNumber) {
430
+ this.processAttachments();
431
+ let attachmentCount = 0;
432
+ if (this.attachmentTable != null) {
433
+ attachmentCount = this.attachmentTable.rowCount;
434
+ }
435
+ if (!this.attachmentTable) {
436
+ throw new Error('PSTMessage::getAttachment attachmentTable is null');
437
+ }
438
+ if (!this.localDescriptorItems) {
439
+ throw new Error('PSTMessage::getAttachment localDescriptorItems is null');
440
+ }
441
+ if (attachmentNumber >= attachmentCount) {
442
+ throw new Error('PSTMessage::getAttachment unable to fetch attachment number ' +
443
+ attachmentNumber);
444
+ }
445
+ // we process the C7 table here, basically we just want the attachment local descriptor...
446
+ const attachmentDetails = this.attachmentTable.getItems()[attachmentNumber];
447
+ const attachmentTableItem = attachmentDetails.get(0x67f2);
448
+ if (!attachmentTableItem) {
449
+ throw new Error('PSTMessage::getAttachment attachmentTableItem is null');
450
+ }
451
+ const descriptorItemId = attachmentTableItem.entryValueReference;
452
+ if (!descriptorItemId) {
453
+ throw new Error('PSTMessage::getAttachment descriptorItemId is null');
454
+ }
455
+ // get the local descriptor for the attachmentDetails table.
456
+ const descriptorItem = this.localDescriptorItems.get(descriptorItemId);
457
+ if (!descriptorItem) {
458
+ throw new Error('PSTMessage::getAttachment descriptorItem is null');
459
+ }
460
+ // try and decode it
461
+ const attachmentData = descriptorItem.getData();
462
+ if (attachmentData != null && attachmentData.length > 0) {
463
+ const attachmentDetailsTable = new PSTTableBC_class_1.PSTTableBC(new PSTNodeInputStream_class_1.PSTNodeInputStream(this.pstFile, descriptorItem));
464
+ // create our all-precious attachment object.
465
+ // note that all the information that was in the c7 table is
466
+ // repeated in the eb table in attachment data.
467
+ // so no need to pass it...
468
+ let attachmentDescriptorItems = new Map();
469
+ if (descriptorItem.subNodeOffsetIndexIdentifier > 0) {
470
+ attachmentDescriptorItems = this.pstFile.getPSTDescriptorItems(long_1.default.fromNumber(descriptorItem.subNodeOffsetIndexIdentifier));
471
+ }
472
+ return new PSTAttachment_class_1.PSTAttachment(this.pstFile, attachmentDetailsTable, attachmentDescriptorItems);
473
+ }
474
+ throw new Error('PSTMessage::getAttachment unable to fetch attachment number ' +
475
+ attachmentNumber +
476
+ ', unable to read attachment details table');
477
+ }
478
+ /*
479
+ Miscellaneous properties
480
+ */
481
+ /**
482
+ * Importance of email (sender determined)
483
+ * https://msdn.microsoft.com/en-us/library/cc815346(v=office.12).aspx
484
+ * @readonly
485
+ * @type {number}
486
+ * @memberof PSTMessage
487
+ */
488
+ get importance() {
489
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_IMPORTANCE, PSTMessage.IMPORTANCE_NORMAL);
490
+ }
491
+ /**
492
+ * Contains a text string that identifies the sender-defined message class, such as IPM.Note.
493
+ * https://msdn.microsoft.com/en-us/library/office/cc765765.aspx
494
+ * @readonly
495
+ * @type {string}
496
+ * @memberof PSTMessage
497
+ */
498
+ get messageClass() {
499
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_CLASS);
500
+ }
501
+ /**
502
+ * Contains the full subject of a message.
503
+ * https://technet.microsoft.com/en-us/library/cc815720
504
+ * @readonly
505
+ * @type {string}
506
+ * @memberof PSTMessage
507
+ */
508
+ get subject() {
509
+ let subject = this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SUBJECT);
510
+ if (subject != null &&
511
+ subject.length >= 2 &&
512
+ subject.charCodeAt(0) == 0x01) {
513
+ if (subject.length == 2) {
514
+ subject = '';
515
+ }
516
+ else {
517
+ subject = subject.substring(2, subject.length);
518
+ }
519
+ }
520
+ return subject;
521
+ }
522
+ /**
523
+ * Contains the date and time the message sender submitted a message.
524
+ * https://technet.microsoft.com/en-us/library/cc839781
525
+ * @readonly
526
+ * @type {Date}
527
+ * @memberof PSTMessage
528
+ */
529
+ get clientSubmitTime() {
530
+ return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_CLIENT_SUBMIT_TIME);
531
+ }
532
+ /**
533
+ * Contains the display name of the messaging user who receives the message.
534
+ * https://msdn.microsoft.com/en-us/library/office/cc840015.aspx
535
+ * @readonly
536
+ * @type {string}
537
+ * @memberof PSTMessage
538
+ */
539
+ get receivedByName() {
540
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RECEIVED_BY_NAME);
541
+ }
542
+ /**
543
+ * Contains the display name for the messaging user represented by the sender.
544
+ * https://msdn.microsoft.com/en-us/library/office/cc842405.aspx
545
+ * @readonly
546
+ * @type {string}
547
+ * @memberof PSTMessage
548
+ */
549
+ get sentRepresentingName() {
550
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_NAME);
551
+ }
552
+ /**
553
+ * Contains the address type for the messaging user who is represented by the sender.
554
+ * https://msdn.microsoft.com/en-us/library/office/cc839677.aspx
555
+ * @readonly
556
+ * @type {string}
557
+ * @memberof PSTMessage
558
+ */
559
+ get sentRepresentingAddressType() {
560
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_ADDRTYPE);
561
+ }
562
+ /**
563
+ * Contains the e-mail address for the messaging user who is represented by the sender.
564
+ * https://msdn.microsoft.com/en-us/library/office/cc839552.aspx
565
+ * @readonly
566
+ * @type {string}
567
+ * @memberof PSTMessage
568
+ */
569
+ get sentRepresentingEmailAddress() {
570
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_EMAIL_ADDRESS);
571
+ }
572
+ /**
573
+ * Contains the topic of the first message in a conversation thread.
574
+ * https://technet.microsoft.com/en-us/windows/cc839841
575
+ * @readonly
576
+ * @type {string}
577
+ * @memberof PSTMessage
578
+ */
579
+ get conversationTopic() {
580
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_CONVERSATION_TOPIC);
581
+ }
582
+ /**
583
+ * Contains the e-mail address type, such as SMTP, for the messaging user who actually receives the message.
584
+ * https://technet.microsoft.com/en-us/library/cc765641(v=office.14)
585
+ * @readonly
586
+ * @type {string}
587
+ * @memberof PSTMessage
588
+ */
589
+ get receivedByAddressType() {
590
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RECEIVED_BY_ADDRTYPE);
591
+ }
592
+ /**
593
+ * Contains the e-mail address for the messaging user who receives the message.
594
+ * https://technet.microsoft.com/en-us/library/cc839550(v=office.14)
595
+ * @readonly
596
+ * @type {string}
597
+ * @memberof PSTMessage
598
+ */
599
+ get receivedByAddress() {
600
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RECEIVED_BY_EMAIL_ADDRESS);
601
+ }
602
+ /**
603
+ * Contains transport-specific message envelope information.
604
+ * https://technet.microsoft.com/en-us/library/cc815628
605
+ * @readonly
606
+ * @type {string}
607
+ * @memberof PSTMessage
608
+ */
609
+ get transportMessageHeaders() {
610
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_TRANSPORT_MESSAGE_HEADERS);
611
+ }
612
+ // Acknowledgment mode Integer 32-bit signed
613
+ get acknowledgementMode() {
614
+ return this.getIntItem(0x0001);
615
+ }
616
+ /**
617
+ * Contains TRUE if a message sender requests a delivery report for a particular recipient from the messaging system before the message is placed in the message store.
618
+ * https://msdn.microsoft.com/en-us/library/office/cc765845.aspx
619
+ * @readonly
620
+ * @type {boolean}
621
+ * @memberof PSTMessage
622
+ */
623
+ get originatorDeliveryReportRequested() {
624
+ return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ORIGINATOR_DELIVERY_REPORT_REQUESTED) != 0);
625
+ }
626
+ /**
627
+ * Contains the relative priority of a message.
628
+ * https://msdn.microsoft.com/en-us/library/office/cc765646.aspx
629
+ * @readonly
630
+ * @type {number}
631
+ * @memberof PSTMessage
632
+ */
633
+ get priority() {
634
+ return this.getIntItem(0x0026);
635
+ }
636
+ /**
637
+ * Contains TRUE if a message sender wants the messaging system to generate a read report when the recipient has read a message.
638
+ * https://msdn.microsoft.com/en-us/library/office/cc842094.aspx
639
+ * @readonly
640
+ * @type {boolean}
641
+ * @memberof PSTMessage
642
+ */
643
+ get readReceiptRequested() {
644
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_READ_RECEIPT_REQUESTED) != 0;
645
+ }
646
+ /**
647
+ * Specifies whether adding additional recipients, when forwarding the message, is prohibited for the e-mail message.
648
+ * https://msdn.microsoft.com/en-us/library/office/cc979216.aspx
649
+ * @readonly
650
+ * @type {boolean}
651
+ * @memberof PSTMessage
652
+ */
653
+ get recipientReassignmentProhibited() {
654
+ return (this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RECIPIENT_REASSIGNMENT_PROHIBITED) !=
655
+ 0);
656
+ }
657
+ /**
658
+ * Contains the sensitivity value assigned by the sender of the first version of a message that is, the message before being forwarded or replied to.
659
+ * https://msdn.microsoft.com/en-us/library/cc839694(office.12).aspx
660
+ * @readonly
661
+ * @type {number}
662
+ * @memberof PSTMessage
663
+ */
664
+ get originalSensitivity() {
665
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_SENSITIVITY);
666
+ }
667
+ /**
668
+ * Contains a value that indicates the message sender's opinion of the sensitivity of a message.
669
+ * https://msdn.microsoft.com/en-us/library/office/cc839518.aspx
670
+ * @readonly
671
+ * @type {number}
672
+ * @memberof PSTMessage
673
+ */
674
+ get sensitivity() {
675
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_SENSITIVITY);
676
+ }
677
+ /**
678
+ * Contains the search key for the messaging user represented by the sender.
679
+ * https://msdn.microsoft.com/en-us/magazine/cc842068.aspx
680
+ * @readonly
681
+ * @type {Buffer}
682
+ * @memberof PSTMessage
683
+ */
684
+ get pidTagSentRepresentingSearchKey() {
685
+ return this.getBinaryItem(OutlookProperties_1.OutlookProperties.PR_SENT_REPRESENTING_SEARCH_KEY);
686
+ }
687
+ /**
688
+ * Contains the display name for the messaging user who is represented by the receiving user.
689
+ * https://technet.microsoft.com/en-us/library/cc842260.aspx
690
+ * @readonly
691
+ * @type {string}
692
+ * @memberof PSTMessage
693
+ */
694
+ get rcvdRepresentingName() {
695
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RCVD_REPRESENTING_NAME);
696
+ }
697
+ /**
698
+ * Contains the subject of an original message for use in a report about the message.
699
+ * https://msdn.microsoft.com/en-us/library/office/cc842182.aspx
700
+ * @readonly
701
+ * @type {string}
702
+ * @memberof PSTMessage
703
+ */
704
+ get originalSubject() {
705
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_SUBJECT);
706
+ }
707
+ /**
708
+ * Contains a list of display names for recipients that are to get a reply.
709
+ * https://msdn.microsoft.com/en-us/library/windows/desktop/cc815850.aspx
710
+ * @readonly
711
+ * @type {string}
712
+ * @memberof PSTMessage
713
+ */
714
+ get replyRecipientNames() {
715
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_REPLY_RECIPIENT_NAMES);
716
+ }
717
+ /**
718
+ * Contains TRUE if this messaging user is specifically named as a primary (To) recipient of this message and is not part of a distribution list.
719
+ * https://technet.microsoft.com/en-us/library/cc815755
720
+ * @readonly
721
+ * @type {boolean}
722
+ * @memberof PSTMessage
723
+ */
724
+ get messageToMe() {
725
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_TO_ME) != 0;
726
+ }
727
+ /**
728
+ * Contains TRUE if this messaging user is specifically named as a carbon copy (CC) recipient of this message and is not part of a distribution list.
729
+ * https://msdn.microsoft.com/en-us/library/office/cc839713.aspx
730
+ * @readonly
731
+ * @type {boolean}
732
+ * @memberof PSTMessage
733
+ */
734
+ get messageCcMe() {
735
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_CC_ME) != 0;
736
+ }
737
+ /**
738
+ * Contains TRUE if this messaging user is specifically named as a primary (To), carbon copy (CC), or blind carbon copy (BCC) recipient of this message and is not part of a distribution list.
739
+ * https://msdn.microsoft.com/en-us/library/office/cc842268.aspx
740
+ * @readonly
741
+ * @type {boolean}
742
+ * @memberof PSTMessage
743
+ */
744
+ get messageRecipMe() {
745
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_RECIP_ME) != 0;
746
+ }
747
+ /**
748
+ * Contains TRUE if the message sender wants a response to a meeting request.
749
+ * https://msdn.microsoft.com/en-us/library/office/cc839921.aspx
750
+ * @readonly
751
+ * @type {boolean}
752
+ * @memberof PSTMessage
753
+ */
754
+ get responseRequested() {
755
+ return this.getBooleanItem(OutlookProperties_1.OutlookProperties.PR_RESPONSE_REQUESTED);
756
+ }
757
+ /**
758
+ * Contains the display names of any carbon copy (CC) recipients of the original message.
759
+ * https://msdn.microsoft.com/en-us/magazine/cc815841(v=office.14).aspx
760
+ * @readonly
761
+ * @type {string}
762
+ * @memberof PSTMessage
763
+ */
764
+ get originalDisplayBcc() {
765
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_DISPLAY_BCC);
766
+ }
767
+ /**
768
+ * Contains the display names of any carbon copy (CC) recipients of the original message.
769
+ * https://msdn.microsoft.com/en-us/magazine/cc815841(v=office.14).aspx
770
+ * @readonly
771
+ * @type {string}
772
+ * @memberof PSTMessage
773
+ */
774
+ get originalDisplayCc() {
775
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_DISPLAY_CC);
776
+ }
777
+ /**
778
+ * Contains the display names of the primary (To) recipients of the original message.
779
+ * https://msdn.microsoft.com/en-us/magazine/cc842235(v=office.14).aspx
780
+ * @readonly
781
+ * @type {string}
782
+ * @memberof PSTMessage
783
+ */
784
+ get originalDisplayTo() {
785
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ORIGINAL_DISPLAY_TO);
786
+ }
787
+ /**
788
+ * Contains the address type for the messaging user who is represented by the user actually receiving the message.
789
+ * https://msdn.microsoft.com/en-us/library/office/cc842447.aspx
790
+ * @readonly
791
+ * @type {string}
792
+ * @memberof PSTMessage
793
+ */
794
+ get rcvdRepresentingAddrtype() {
795
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RCVD_REPRESENTING_ADDRTYPE);
796
+ }
797
+ /**
798
+ * Contains the e-mail address for the messaging user who is represented by the receiving user.
799
+ * https://msdn.microsoft.com/en-us/library/office/cc815875.aspx
800
+ * @readonly
801
+ * @type {string}
802
+ * @memberof PSTMessage
803
+ */
804
+ get rcvdRepresentingEmailAddress() {
805
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_RCVD_REPRESENTING_EMAIL_ADDRESS);
806
+ }
807
+ /**
808
+ * Contains TRUE if a message sender requests a reply from a recipient.
809
+ * https://msdn.microsoft.com/en-us/library/office/cc815286.aspx
810
+ * @readonly
811
+ * @type {boolean}
812
+ * @memberof PSTMessage
813
+ */
814
+ get isReplyRequested() {
815
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_REPLY_REQUESTED) != 0;
816
+ }
817
+ /**
818
+ * Contains the message sender's entry identifier.
819
+ * https://msdn.microsoft.com/en-us/library/office/cc815625.aspx
820
+ * @readonly
821
+ * @type {Buffer}
822
+ * @memberof PSTMessage
823
+ */
824
+ get senderEntryId() {
825
+ return this.getBinaryItem(OutlookProperties_1.OutlookProperties.PR_SENDER_ENTRYID);
826
+ }
827
+ /**
828
+ * Contains the message sender's display name.
829
+ * https://msdn.microsoft.com/en-us/library/office/cc815457.aspx
830
+ * @readonly
831
+ * @type {string}
832
+ * @memberof PSTMessage
833
+ */
834
+ get senderName() {
835
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENDER_NAME);
836
+ }
837
+ /**
838
+ * Contains the message sender's e-mail address type.
839
+ * https://msdn.microsoft.com/en-us/library/office/cc815748.aspx
840
+ * @readonly
841
+ * @type {string}
842
+ * @memberof PSTMessage
843
+ */
844
+ get senderAddrtype() {
845
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENDER_ADDRTYPE);
846
+ }
847
+ /**
848
+ * Contains the message sender's e-mail address.
849
+ * https://msdn.microsoft.com/en-us/library/office/cc839670.aspx
850
+ * @readonly
851
+ * @type {string}
852
+ * @memberof PSTMessage
853
+ */
854
+ get senderEmailAddress() {
855
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_SENDER_EMAIL_ADDRESS);
856
+ }
857
+ /**
858
+ * Contains the sum, in bytes, of the sizes of all properties on a message object
859
+ * https://technet.microsoft.com/en-us/library/cc842471
860
+ * @readonly
861
+ * @type {long}
862
+ * @memberof PSTMessage
863
+ */
864
+ get messageSize() {
865
+ return this.getLongItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_SIZE);
866
+ }
867
+ /**
868
+ * A number associated with an item in a message store.
869
+ * https://msdn.microsoft.com/en-us/library/office/cc815718.aspx
870
+ * @readonly
871
+ * @type {number}
872
+ * @memberof PSTMessage
873
+ */
874
+ get internetArticleNumber() {
875
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_INTERNET_ARTICLE_NUMBER);
876
+ }
877
+ /**
878
+ * Contains a string that names the first server that is used to send the message.
879
+ * https://msdn.microsoft.com/en-us/library/office/cc815413.aspx
880
+ * @readonly
881
+ * @type {string}
882
+ * @memberof PSTMessage
883
+ */
884
+ get primarySendAccount() {
885
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_PRIMARY_SEND_ACCOUNT);
886
+ }
887
+ /**
888
+ * Specifies the server that a client is currently attempting to use to send e-mail.
889
+ * https://technet.microsoft.com/en-us/library/cc842327(v=office.14)
890
+ * @readonly
891
+ * @type {string}
892
+ * @memberof PSTMessage
893
+ */
894
+ get nextSendAcct() {
895
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_NEXT_SEND_ACCT);
896
+ }
897
+ /**
898
+ * Contains the type of an object.
899
+ * https://msdn.microsoft.com/en-us/library/office/cc815487.aspx
900
+ * @readonly
901
+ * @type {number}
902
+ * @memberof PSTMessage
903
+ */
904
+ get objectType() {
905
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_OBJECT_TYPE);
906
+ }
907
+ /**
908
+ * Contains TRUE if a client application wants MAPI to delete the associated message after submission.
909
+ * https://msdn.microsoft.com/en-us/library/office/cc842353.aspx
910
+ * @readonly
911
+ * @type {boolean}
912
+ * @memberof PSTMessage
913
+ */
914
+ get deleteAfterSubmit() {
915
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_DELETE_AFTER_SUBMIT) != 0;
916
+ }
917
+ /**
918
+ * Contains TRUE if some transport provider has already accepted responsibility for delivering the message to this recipient, and FALSE if the MAPI spooler considers that this transport provider should accept responsibility.
919
+ * https://msdn.microsoft.com/en-us/library/office/cc765767.aspx
920
+ * @readonly
921
+ * @type {boolean}
922
+ * @memberof PSTMessage
923
+ */
924
+ get responsibility() {
925
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RESPONSIBILITY) != 0;
926
+ }
927
+ /**
928
+ * Contains TRUE if the PR_RTF_COMPRESSED (PidTagRtfCompressed) property has the same text content as the PR_BODY (PidTagBody) property for this message.
929
+ * https://msdn.microsoft.com/en-us/library/office/cc765844.aspx
930
+ * @readonly
931
+ * @type {boolean}
932
+ * @memberof PSTMessage
933
+ */
934
+ get isRTFInSync() {
935
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_RTF_IN_SYNC) != 0;
936
+ }
937
+ /**
938
+ * Contains an ASCII list of the display names of any blind carbon copy (BCC) message recipients, separated by semicolons (;).
939
+ * https://msdn.microsoft.com/en-us/library/office/cc815730.aspx
940
+ * @readonly
941
+ * @type {string}
942
+ * @memberof PSTMessage
943
+ */
944
+ get displayBCC() {
945
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_DISPLAY_BCC);
946
+ }
947
+ /**
948
+ * Contains an ASCII list of the display names of any carbon copy (CC) message recipients, separated by semicolons (;).
949
+ * https://msdn.microsoft.com/en-us/library/office/cc765528.aspx
950
+ * @readonly
951
+ * @type {string}
952
+ * @memberof PSTMessage
953
+ */
954
+ get displayCC() {
955
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_DISPLAY_CC);
956
+ }
957
+ /**
958
+ * Contains a list of the display names of the primary (To) message recipients, separated by semicolons (;).
959
+ * https://msdn.microsoft.com/en-us/library/office/cc839687.aspx
960
+ * @readonly
961
+ * @type {string}
962
+ * @memberof PSTMessage
963
+ */
964
+ get displayTo() {
965
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_DISPLAY_TO);
966
+ }
967
+ /**
968
+ * Contains the date and time when a message was delivered.
969
+ * https://msdn.microsoft.com/en-us/library/office/cc841961.aspx
970
+ * @readonly
971
+ * @type {Date}
972
+ * @memberof PSTMessage
973
+ */
974
+ get messageDeliveryTime() {
975
+ return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_MESSAGE_DELIVERY_TIME);
976
+ }
977
+ /**
978
+ * Corresponds to the message ID field as specified in [RFC2822].
979
+ * https://msdn.microsoft.com/en-us/library/office/cc839521.aspx
980
+ * @readonly
981
+ * @type {string}
982
+ * @memberof PSTMessage
983
+ */
984
+ get internetMessageId() {
985
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_INTERNET_MESSAGE_ID);
986
+ }
987
+ /**
988
+ * Contains the original message's PR_INTERNET_MESSAGE_ID (PidTagInternetMessageId) property value.
989
+ * https://msdn.microsoft.com/en-us/library/office/cc839776.aspx
990
+ * @readonly
991
+ * @type {string}
992
+ * @memberof PSTMessage
993
+ */
994
+ get inReplyToId() {
995
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_IN_REPLY_TO_ID);
996
+ }
997
+ /**
998
+ * Contains the value of a Multipurpose Internet Mail Extensions (MIME) message's Return-Path header field. The e-mail address of the message's sender.
999
+ * https://msdn.microsoft.com/en-us/library/office/cc765856.aspx
1000
+ * @readonly
1001
+ * @type {string}
1002
+ * @memberof PSTMessage
1003
+ */
1004
+ get returnPath() {
1005
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_INTERNET_RETURN_PATH);
1006
+ }
1007
+ /**
1008
+ * Contains a number that indicates which icon to use when you display a group of e-mail objects.
1009
+ * https://msdn.microsoft.com/en-us/library/office/cc815472.aspx
1010
+ * @readonly
1011
+ * @type {number}
1012
+ * @memberof PSTMessage
1013
+ */
1014
+ get iconIndex() {
1015
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ICON_INDEX);
1016
+ }
1017
+ /**
1018
+ * Contains the last verb executed.
1019
+ * Todo: Helper methods for each flag.
1020
+ * https://msdn.microsoft.com/en-us/library/office/cc841968.aspx
1021
+ * @readonly
1022
+ * @type {number}
1023
+ * @memberof PSTMessage
1024
+ */
1025
+ get lastVerbExecuted() {
1026
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_LAST_VERB_EXECUTED);
1027
+ }
1028
+ /**
1029
+ * Contains the time when the last verb was executed.
1030
+ * https://msdn.microsoft.com/en-us/library/office/cc839918.aspx
1031
+ * @readonly
1032
+ * @type {Date}
1033
+ * @memberof PSTMessage
1034
+ */
1035
+ get lastVerbExecutionTime() {
1036
+ return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_LAST_VERB_EXECUTION_TIME);
1037
+ }
1038
+ /**
1039
+ * The URL component name for a message.
1040
+ * https://msdn.microsoft.com/en-us/library/office/cc815653.aspx
1041
+ * @readonly
1042
+ * @type {String}
1043
+ * @memberof PSTMessage
1044
+ */
1045
+ get urlCompName() {
1046
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_URL_COMP_NAME);
1047
+ }
1048
+ /**
1049
+ * Specifies the hide or show status of a folder.
1050
+ * https://msdn.microsoft.com/en-us/library/ee159038(v=exchg.80).aspx
1051
+ * @readonly
1052
+ * @type {boolean}
1053
+ * @memberof PSTMessage
1054
+ */
1055
+ get attrHidden() {
1056
+ return this.getIntItem(OutlookProperties_1.OutlookProperties.PR_ATTR_HIDDEN) != 0;
1057
+ }
1058
+ /**
1059
+ * Specifies the date on which the user expects work on the task to begin.
1060
+ * https://technet.microsoft.com/en-us/library/cc815922(v=office.12).aspx
1061
+ * @readonly
1062
+ * @type {Date}
1063
+ * @memberof PSTMessage
1064
+ */
1065
+ get taskStartDate() {
1066
+ return this.getDateItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidTaskStartDate, PSTFile_class_1.PSTFile.PSETID_Task));
1067
+ }
1068
+ /**
1069
+ * Represents the date when the user expects to complete the task.
1070
+ * https://technet.microsoft.com/en-us/library/cc839641(v=office.12).aspx
1071
+ * @readonly
1072
+ * @type {Date}
1073
+ * @memberof PSTMessage
1074
+ */
1075
+ get taskDueDate() {
1076
+ return this.getDateItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidTaskDueDate, PSTFile_class_1.PSTFile.PSETID_Task));
1077
+ }
1078
+ /**
1079
+ * Specifies whether a reminder is set on the object.
1080
+ * https://msdn.microsoft.com/en-us/library/office/cc765589.aspx
1081
+ * @readonly
1082
+ * @type {boolean}
1083
+ * @memberof PSTMessage
1084
+ */
1085
+ get reminderSet() {
1086
+ return this.getBooleanItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidReminderSet, OutlookProperties_1.OutlookProperties.PSETID_Common));
1087
+ }
1088
+ /**
1089
+ * Specifies the interval, in minutes, between the time when the reminder first becomes overdue and the start time of the calendar object.
1090
+ * https://msdn.microsoft.com/en-us/library/office/cc765535.aspx
1091
+ * @readonly
1092
+ * @type {number}
1093
+ * @memberof PSTMessage
1094
+ */
1095
+ get reminderDelta() {
1096
+ return this.getIntItem(this.pstFile.getNameToIdMapItem(OutlookProperties_1.OutlookProperties.PidLidReminderDelta, OutlookProperties_1.OutlookProperties.PSETID_Common));
1097
+ }
1098
+ /**
1099
+ * Color categories
1100
+ * @readonly
1101
+ * @type {string[]}
1102
+ * @memberof PSTMessage
1103
+ */
1104
+ get colorCategories() {
1105
+ const keywordCategory = PSTFile_class_1.PSTFile.getPublicStringToIdMapItem('Keywords');
1106
+ const categories = [];
1107
+ if (this.pstTableItems && this.pstTableItems.has(keywordCategory)) {
1108
+ try {
1109
+ const item = this.pstTableItems.get(keywordCategory);
1110
+ if (item && item.data.length == 0) {
1111
+ return [];
1112
+ }
1113
+ if (item) {
1114
+ const categoryCount = item.data[0];
1115
+ if (categoryCount > 0) {
1116
+ const categories = [];
1117
+ const offsets = [];
1118
+ for (let x = 0; x < categoryCount; x++) {
1119
+ offsets[x] = PSTUtil_class_1.PSTUtil.convertBigEndianBytesToLong(item.data, x * 4 + 1, (x + 1) * 4 + 1).toNumber();
1120
+ }
1121
+ for (let x = 0; x < offsets.length - 1; x++) {
1122
+ const start = offsets[x];
1123
+ const end = offsets[x + 1];
1124
+ const length = end - start;
1125
+ const buf = Buffer.alloc(length);
1126
+ PSTUtil_class_1.PSTUtil.arraycopy(item.data, start, buf, 0, length);
1127
+ const name = Buffer.from(buf).toString();
1128
+ categories[x] = name;
1129
+ }
1130
+ const start = offsets[offsets.length - 1];
1131
+ const end = item.data.length;
1132
+ const length = end - start;
1133
+ const buf = Buffer.alloc(length);
1134
+ PSTUtil_class_1.PSTUtil.arraycopy(item.data, start, buf, 0, length);
1135
+ const name = Buffer.from(buf).toString();
1136
+ categories[categories.length - 1] = name;
1137
+ }
1138
+ }
1139
+ }
1140
+ catch (err) {
1141
+ console.error('PSTMessage::colorCategories Unable to decode category data\n' + err);
1142
+ throw err;
1143
+ }
1144
+ }
1145
+ return categories;
1146
+ }
1147
+ /**
1148
+ * Contains a computed value derived from other conversation-related properties.
1149
+ * https://msdn.microsoft.com/en-us/library/ee204279(v=exchg.80).aspx
1150
+ * @readonly
1151
+ * @type {Buffer}
1152
+ * @memberof PSTMessage
1153
+ */
1154
+ get conversationId() {
1155
+ return this.getBinaryItem(OutlookProperties_1.OutlookProperties.PidTagConversationId);
1156
+ }
1157
+ /**
1158
+ * Indicates whether the GUID portion of the PidTagConversationIndex property (section 2.641) is to be used to compute the PidTagConversationId property (section 2.640).
1159
+ * https://msdn.microsoft.com/en-us/library/ee218393(v=exchg.80).aspx
1160
+ * @readonly
1161
+ * @type {boolean}
1162
+ * @memberof PSTMessage
1163
+ */
1164
+ get isConversationIndexTracking() {
1165
+ return this.getBooleanItem(OutlookProperties_1.OutlookProperties.PidTagConversationIndexTracking, false);
1166
+ }
1167
+ /**
1168
+ * Contains the messaging user's e-mail address.
1169
+ * https://msdn.microsoft.com/en-us/library/office/cc842372.aspx
1170
+ * @readonly
1171
+ * @type {string}
1172
+ * @memberof PSTMessage
1173
+ */
1174
+ get emailAddress() {
1175
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_EMAIL_ADDRESS);
1176
+ }
1177
+ /**
1178
+ * Contains the messaging user's e-mail address type, such as SMTP.
1179
+ * https://msdn.microsoft.com/en-us/library/office/cc815548.aspx
1180
+ * @readonly
1181
+ * @type {string}
1182
+ * @memberof PSTMessage
1183
+ */
1184
+ get addrType() {
1185
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_ADDRTYPE);
1186
+ }
1187
+ /**
1188
+ * Contains a comment about the purpose or content of an object.
1189
+ * https://msdn.microsoft.com/en-us/library/office/cc842022.aspx
1190
+ * @readonly
1191
+ * @type {string}
1192
+ * @memberof PSTMessage
1193
+ */
1194
+ get comment() {
1195
+ return this.getStringItem(OutlookProperties_1.OutlookProperties.PR_COMMENT);
1196
+ }
1197
+ /**
1198
+ * Contains the creation date and time of a message.
1199
+ * https://msdn.microsoft.com/en-us/library/office/cc765677.aspx
1200
+ * @readonly
1201
+ * @type {Date}
1202
+ * @memberof PSTMessage
1203
+ */
1204
+ get creationTime() {
1205
+ return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_CREATION_TIME);
1206
+ }
1207
+ /**
1208
+ * Contains the date and time when the object or subobject was last modified.
1209
+ * https://msdn.microsoft.com/en-us/library/office/cc815689.aspx
1210
+ * @readonly
1211
+ * @type {Date}
1212
+ * @memberof PSTMessage
1213
+ */
1214
+ get modificationTime() {
1215
+ return this.getDateItem(OutlookProperties_1.OutlookProperties.PR_LAST_MODIFICATION_TIME);
1216
+ }
1217
+ /**
1218
+ * JSON stringify the object properties. Large fields (like body) aren't included.
1219
+ * @returns {string}
1220
+ * @memberof PSTMessage
1221
+ */
1222
+ toJSON() {
1223
+ const clone = Object.assign({
1224
+ messageClass: this.messageClass,
1225
+ emailAddress: this.emailAddress,
1226
+ subject: this.subject,
1227
+ addrType: this.addrType,
1228
+ comment: this.comment,
1229
+ creationTime: this.creationTime,
1230
+ modificationTime: this.modificationTime,
1231
+ importance: this.importance,
1232
+ transportMessageHeaders: this.transportMessageHeaders,
1233
+ clientSubmitTime: this.clientSubmitTime,
1234
+ receivedByName: this.receivedByName,
1235
+ sentRepresentingName: this.sentRepresentingName,
1236
+ sentRepresentingAddressType: this.sentRepresentingAddressType,
1237
+ sentRepresentingEmailAddress: this.sentRepresentingEmailAddress,
1238
+ conversationTopic: this.conversationTopic,
1239
+ receivedByAddressType: this.receivedByAddressType,
1240
+ receivedByAddress: this.receivedByAddress,
1241
+ isRead: this.isRead,
1242
+ isUnmodified: this.isUnmodified,
1243
+ isSubmitted: this.isSubmitted,
1244
+ isUnsent: this.isUnsent,
1245
+ hasAttachments: this.hasAttachments,
1246
+ isFromMe: this.isFromMe,
1247
+ isAssociated: this.isAssociated,
1248
+ isResent: this.isResent,
1249
+ acknowledgementMode: this.acknowledgementMode,
1250
+ originatorDeliveryReportRequested: this
1251
+ .originatorDeliveryReportRequested,
1252
+ readReceiptRequested: this.readReceiptRequested,
1253
+ recipientReassignmentProhibited: this.recipientReassignmentProhibited,
1254
+ originalSensitivity: this.originalSensitivity,
1255
+ sensitivity: this.sensitivity,
1256
+ rcvdRepresentingName: this.rcvdRepresentingName,
1257
+ bloriginalSubjectah: this.originalSubject,
1258
+ replyRecipientNames: this.replyRecipientNames,
1259
+ messageToMe: this.messageToMe,
1260
+ messageCcMe: this.messageCcMe,
1261
+ messageRecipMe: this.messageRecipMe,
1262
+ responseRequested: this.responseRequested,
1263
+ originalDisplayBcc: this.originalDisplayBcc,
1264
+ originalDisplayCc: this.originalDisplayCc,
1265
+ originalDisplayTo: this.originalDisplayTo,
1266
+ rcvdRepresentingAddrtype: this.rcvdRepresentingAddrtype,
1267
+ rcvdRepresentingEmailAddress: this.rcvdRepresentingEmailAddress,
1268
+ isNonReceiptNotificationRequested: this
1269
+ .isNonReceiptNotificationRequested,
1270
+ isOriginatorNonDeliveryReportRequested: this
1271
+ .isOriginatorNonDeliveryReportRequested,
1272
+ recipientType: this.recipientType,
1273
+ isReplyRequested: this.isReplyRequested,
1274
+ senderName: this.senderName,
1275
+ senderAddrtype: this.senderAddrtype,
1276
+ senderEmailAddress: this.senderEmailAddress,
1277
+ messageSize: this.messageSize,
1278
+ internetArticleNumber: this.internetArticleNumber,
1279
+ primarySendAccount: this.primarySendAccount,
1280
+ nextSendAcct: this.nextSendAcct,
1281
+ objectType: this.objectType,
1282
+ deleteAfterSubmit: this.deleteAfterSubmit,
1283
+ responsibility: this.responsibility,
1284
+ isRTFInSync: this.isRTFInSync,
1285
+ displayBCC: this.displayBCC,
1286
+ displayCC: this.displayCC,
1287
+ displayTo: this.displayTo,
1288
+ messageDeliveryTime: this.messageDeliveryTime,
1289
+ bodyPrefix: this.bodyPrefix,
1290
+ rtfSyncBodyCRC: this.rtfSyncBodyCRC,
1291
+ rtfSyncBodyCount: this.rtfSyncBodyCount,
1292
+ rtfSyncBodyTag: this.rtfSyncBodyTag,
1293
+ rtfSyncPrefixCount: this.rtfSyncPrefixCount,
1294
+ rtfSyncTrailingCount: this.rtfSyncTrailingCount,
1295
+ internetMessageId: this.internetMessageId,
1296
+ inReplyToId: this.inReplyToId,
1297
+ returnPath: this.returnPath,
1298
+ iconIndex: this.iconIndex,
1299
+ lastVerbExecutionTime: this.lastVerbExecutionTime,
1300
+ urlCompName: this.urlCompName,
1301
+ attrHidden: this.attrHidden,
1302
+ numberOfRecipients: this.numberOfRecipients,
1303
+ taskStartDate: this.taskStartDate,
1304
+ taskDueDate: this.taskDueDate,
1305
+ reminderSet: this.reminderSet,
1306
+ reminderDelta: this.reminderDelta,
1307
+ colorCategories: this.colorCategories,
1308
+ numberOfAttachments: this.numberOfAttachments,
1309
+ conversationId: this.conversationId,
1310
+ isConversationIndexTracking: this.isConversationIndexTracking,
1311
+ recipientTable: this.recipientTable,
1312
+ }, this);
1313
+ return clone;
1314
+ }
1315
+ }
1316
+ exports.PSTMessage = PSTMessage;
1317
+ PSTMessage.IMPORTANCE_LOW = 0;
1318
+ PSTMessage.IMPORTANCE_NORMAL = 1;
1319
+ PSTMessage.IMPORTANCE_HIGH = 2;
1320
+ PSTMessage.RECIPIENT_TYPE_TO = 1;
1321
+ PSTMessage.RECIPIENT_TYPE_CC = 2;