pst-extractor 1.9.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 (59) hide show
  1. package/dist/ColumnDescriptor.class.d.ts +26 -26
  2. package/dist/ColumnDescriptor.class.js +51 -51
  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 -86
  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 -317
  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 -99
  25. package/dist/PSTFile.class.d.ts +215 -216
  26. package/dist/PSTFile.class.js +818 -818
  27. package/dist/PSTFolder.class.d.ts +129 -129
  28. package/dist/PSTFolder.class.js +318 -310
  29. package/dist/PSTMessage.class.d.ts +788 -789
  30. package/dist/PSTMessage.class.js +1321 -1321
  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 -514
  35. package/dist/PSTObject.class.d.ts +133 -134
  36. package/dist/PSTObject.class.js +326 -326
  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 -175
  41. package/dist/PSTTable7C.class.d.ts +45 -45
  42. package/dist/PSTTable7C.class.js +281 -281
  43. package/dist/PSTTableBC.class.d.ts +31 -31
  44. package/dist/PSTTableBC.class.js +111 -111
  45. package/dist/PSTTableItem.class.d.ts +47 -48
  46. package/dist/PSTTableItem.class.js +124 -124
  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 -795
  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 +6 -6
  56. package/example/yarn.lock +95 -44
  57. package/junit.xml +68 -68
  58. package/package.json +26 -26
  59. package/readme.md +1 -3
@@ -1,1321 +1,1321 @@
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;
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;