extract-msg 0.29.6__tar.gz → 0.29.7__tar.gz

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 (40) hide show
  1. {extract_msg-0.29.6 → extract_msg-0.29.7}/CHANGELOG.md +325 -321
  2. {extract_msg-0.29.6 → extract_msg-0.29.7}/LICENSE.txt +674 -674
  3. {extract_msg-0.29.6 → extract_msg-0.29.7}/MANIFEST.in +7 -7
  4. {extract_msg-0.29.6 → extract_msg-0.29.7}/PKG-INFO +4 -7
  5. {extract_msg-0.29.6 → extract_msg-0.29.7}/README.rst +212 -212
  6. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/__init__.py +46 -46
  7. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/__main__.py +56 -56
  8. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/appointment.py +74 -74
  9. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/attachment.py +303 -303
  10. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/attachment_base.py +213 -213
  11. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/compat/os_.py +9 -9
  12. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/constants.py +994 -994
  13. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/contact.py +197 -197
  14. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/data.py +45 -45
  15. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/dev.py +67 -67
  16. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/dev_classes/__init__.py +2 -2
  17. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/dev_classes/attachment.py +84 -84
  18. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/dev_classes/message.py +282 -282
  19. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/exceptions.py +79 -79
  20. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/logging-config/logging-nt.json +64 -64
  21. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/logging-config/logging-posix.json +64 -64
  22. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/message.py +278 -278
  23. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/message_base.py +447 -447
  24. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/msg.py +562 -560
  25. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/named.py +311 -311
  26. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/prop.py +205 -205
  27. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/properties.py +185 -185
  28. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/recipient.py +269 -269
  29. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/utils.py +814 -814
  30. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/validation.py +92 -92
  31. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg.egg-info/PKG-INFO +4 -7
  32. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg.egg-info/entry_points.txt +0 -1
  33. {extract_msg-0.29.6 → extract_msg-0.29.7}/requirements.txt +7 -7
  34. {extract_msg-0.29.6 → extract_msg-0.29.7}/setup.py +48 -48
  35. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg/compat/__init__.py +0 -0
  36. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg.egg-info/SOURCES.txt +0 -0
  37. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg.egg-info/dependency_links.txt +0 -0
  38. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg.egg-info/requires.txt +0 -0
  39. {extract_msg-0.29.6 → extract_msg-0.29.7}/extract_msg.egg-info/top_level.txt +0 -0
  40. {extract_msg-0.29.6 → extract_msg-0.29.7}/setup.cfg +0 -0
@@ -1,321 +1,325 @@
1
- **v0.29.6**
2
- * Corrected error string for incompatible options in `Message.save`.
3
-
4
- **v0.29.5**
5
- * [[TeamMsgExtractor #232](https://github.com/TeamMsgExtractor/msg-extractor/issues/232)] Updated list of known MSG class types so the module would correctly give `UnsupportedMSGTypeError` instead of `UnrecognizedMSGTypeError`.
6
-
7
- **v0.29.4**
8
- * Fixed typo in `utils.knownMsgClass`.
9
- * Updated contributing guidelines and pull request template.
10
-
11
- **v0.29.3**
12
- * [[TeamMsgExtractor #226](https://github.com/TeamMsgExtractor/msg-extractor/issues/198)] Fix typo in command parsing that prevented the usage of `allowFallback`.
13
- * Fixed main still manually navigating to a new directory with os.chdir instead of using `customPath`.
14
- * Fixed issue in main where the `--html` option was being using for both html *and* rtf. This meant if you wanted rtf it would not have used it, and if you wanted html it would have thrown an error.
15
- * Fixed `--out-name` having no effect.
16
- * Fixed `--out` having no effect.
17
-
18
- **v0.29.2**
19
- * Fixed issue where the RTF injection was accidentally doing HTML escapes for non-encapsulated streams and *not* doing escapes for encapsulated streams.
20
- * Fixed name error in `Message.save` causing bad logic. For context, the internal variable `zip` was renamed to `_zip` to avoid a name conflict with the built-in function. Some instances of it were missed.
21
-
22
- **v0.29.1**
23
- * [[TeamMsgExtractor #198](https://github.com/TeamMsgExtractor/msg-extractor/issues/198)] Added a feature to save the header in it's own file (prefers the full raw header if it can find it, otherwise puts in a generated one) that was actually supposed to be in v0.29.0 but I forgot, lol.
24
-
25
- **v0.29.0**
26
- * [[TeamMsgExtractor #207](https://github.com/TeamMsgExtractor/msg-extractor/issues/207)] Made it so that unspecified dates are handled properly. For clarification, an unspecified date is a custom value in MSG files for dates that means that the date is unspecified. It is distinctly different from a property not existing, which will still return None. For unspecified dates, `datetime.datetime.max` is returned. While perhaps not the best solution, it will have to do for now.
27
- * Fixed an issue where `utils.parseType` was returning a string for the date when it makes more sense to return an actual datetime instance.
28
- * [[TeamMsgExtractor #165](https://github.com/TeamMsgExtractor/msg-extractor/issues/165)] [[TeamMsgExtractor #191](https://github.com/TeamMsgExtractor/msg-extractor/issues/191)] Completely redesigned all existing save functions. You can now properly save to custom locations under custom file names. This change may break existing code for several reasons. First, all arguments have been changed to keyword arguments. Second, a few keyword arguments have been renamed to better fit the naming conventions.
29
- * [[TeamMsgExtractor #200](https://github.com/TeamMsgExtractor/msg-extractor/issues/200)] Changed imports to use relative imports instead of hard imports where applicable.
30
- * Updated the save functions to no longer rely on the current working directory to save things. The module now does what it can to use hard pathing so that if you spontaneously change working directory it will not cause problems. This should also allow for saving to be threaded, if I am correct.
31
- * [[TeamMsgExtractor #197](https://github.com/TeamMsgExtractor/msg-extractor/issues/197)] Added new property `Message.defaultFolderName`. This property returns the default name to be used for a Message if none of the options change the name.
32
- * [[TeamMsgExtractor #201](https://github.com/TeamMsgExtractor/msg-extractor/issues/201)] Fixed an issue where if the class type was all caps it would not be recognized. According to the documentation the comparisons should have been case insensitive, but I must have misread it at some point.
33
- * [[TeamMsgExtractor #202](https://github.com/TeamMsgExtractor/msg-extractor/issues/202)] Module will now handle path lengths in a semi-intelligent way to determine how best to save the MSG files. Default path length max is 255.
34
- * [[TeamMsgExtractor #203](https://github.com/TeamMsgExtractor/msg-extractor/issues/203)] Fixed an issue where having multiple "." characters in your file name would cause the directories to be incorrectly named when using the `useFileName` (now `useMsgFilename`) argument in the save function.
35
- * [[TeamMsgExtractor #204](https://github.com/TeamMsgExtractor/msg-extractor/issues/204)] Fixed an issue where the failsafe name used by attachments wasn't being encoded before hand causing encoding errors.
36
- * MSG files with a type of simply `IPM` will now be returned as `MSGFile` by `openMsg`, as this specifies that no format has been specified.
37
- * [[TeamMsgExtractor #214](https://github.com/TeamMsgExtractor/msg-extractor/issues/214)] Attachments that error because the MSG class type wasn't recognized or isn't supported will now correctly be `UnsupportedAttachment` instead of `BrokenAttachment`.
38
- * Improved internal code in many functions to make them faster and more efficient.
39
- * `openMsg` will now tell you if a class type is simply unsupported rather than unrecognized. If it is found in the list, the function will raise `UnsupportedMSGTypeError`.
40
- * Added caching to `MSGFile.listDir`. I found that if you have larger files this single function might be taking up over half of the processing time because of how many times it is used in the module.
41
- * Fully implemented raw saving.
42
- * Extended the `Contact` class to have more properties.
43
- * Added new function `MSGFile._ensureSetTyped` which acts like the other ensure set functions but doesn't require you to know the type. Prefer to use other ensure set function when you know exactly what type it will be.
44
- * Changed `Message.saveRaw` to `MSGFile.saveRaw`.
45
- * Changed `MSGFile.saveRaw` to take a path and save the contents to a zip file.
46
- * Corrected the help doc to reflect the current repository (was still on mattgwwalker).
47
- * Fixed a bug that would cause an exception on trying to access the RTF body on a file that didn't have one. This is now correctly returning `None`.
48
- * The `raw` keyword of `Message.save` now actually works.
49
- * Added property `Attachment.randomFilename` which allows you to get the randomly generated name for attachments that don't have a usable one otherwise.
50
- * Added function `Attachment.regenerateRandomName` for creating a new random name if necessary.
51
- * Added function `Attachment.getFilename`. This function is used to get the name an attachment will be saved with given the specified arguments. Arguments are identical to `Attachment.save`.
52
- * Changed pull requests to reflect new style.
53
- * Added additional properties for defined MSG file fields.
54
- * Added zip file support for the `Attachment.save` and `Message.save`. Simply pass a path for the `zip` keyword argument and it will create a new `ZipFile` instance and save all of it's data inside there. Alternatively, you can pass an instance of a class that is either a `ZipFile` or `ZipFile`-like and it will simply use that. When this argument is defined, the `customPath` argument refers to the path inside the zip file.
55
- * Added the `html` and `rtf` keywords to `Message.save`. These will attempt to save the body in the html or rtf format, respectively. If the program cannot save in those formats, it will raise an exception unless the `allowFallback` keyword argument is `True`.
56
- * Changed `utils.hasLen` to use `hasattr` instead of the try-except method it was using.
57
- * Added new option `recipientSeparator` to `MessageBase` allowing you to specify a custom recipient separator (default is ";" to match Microsoft Outlook).
58
- * Changed the `openMsg` function in `Attachment` to not be strict. This allows you to actually open the MSG file even if we don't recognize the type of embedded MSG that is being used.
59
- * Attempted to normalize encoding names throughout the module so that a certain encoding will only show up using one name and not multiple.
60
- * Finally figured out what CRC32 algorithm is used in named properties after directly asking in a Microsoft forum (see the thread [here](https://docs.microsoft.com/en-us/answers/questions/574894/ms-oxmsg-specifies-the-use-of-crc-32-checksums-wit.html)). Fortunately the is already defined in the `compressed-rtf` module so we can take advantage of that.
61
- * Reworked `MessageBase._genRecipient` to improve it (because what on earth was that code it was using before?). Variables in the function are now more descriptive. Added comments in several places.
62
- * Many renames to better fit naming convention:
63
- * `dev.setup_dev_logger` to `dev.setupDevLogger`.
64
- * `MSGFile.fix_path` to `MSGFile.fixPath`.
65
- * `MessageBase.save_attachments` to `MessageBase.saveAttachments`.
66
- * `*.Exists` to `exists`.
67
- * `*.ExistsTypedProperty` to `*.existsTypedProperty`.
68
- * `prop.create_prop` to `prop.createProp`.
69
- * `Properties.attachment_count` to `Properties.attachmentCount`.
70
- * `Properties.next_attachment_id` to `Properties.nextAttachmentId`.
71
- * `Properties.next_recipient_id` to `Properties.nextRecipientId`.
72
- * `Properties.recipient_count` to `Properties.recipientCount`.
73
- * `utils.get_command_args` to `utils.getCommandArgs`.
74
- * `utils.get_full_class_name` to `utils.getFullClassName`.
75
- * `utils.get_input` to `utils.getInput`.
76
- * `utils.has_len` to `utils.hasLen`.
77
- * `utils.setup_logging` to `utils.setupLogging`.
78
- * `constants.int_to_data_type` to `constants.intToDataType`.
79
- * `constants.int_to_intelligence` to `constants.intToIntelligence`.
80
- * `constants.int_to_recipient_type` to `constants.intToRecipientType`.
81
- * Misc internal function variables.
82
-
83
- **v0.28.7**
84
- * Added hex versions of the `MULTIPLE_X_BYTES` constants.
85
- * Added `1048` to `constants.MULTIPLE_16_BYTES`
86
- * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] rewrote the parsing of the length in `VariableLengthProp.__init__` to use constants rather than values coded directly into the function. This should fix this issue.
87
-
88
- **v0.28.6**
89
- * [[TeamMsgExtractor #191](https://github.com/TeamMsgExtractor/msg-extractor/issues/191)] This feature was never properly implemented, so it's not officially supported. However, this specific issue should be fixed. This is a temporary patch until I can get around to rewriting the way the module saves files in general.
90
- * Added `venv` to the .gitignore list.
91
- * Added information to the readme.
92
-
93
- **v0.28.5**
94
- * [[TeamMsgExtractor #189](https://github.com/TeamMsgExtractor/msg-extractor/issues/189)] Forgot to import `prepareFilename` in `attachment.py`.
95
- * Fixed bad link in the changelog.
96
-
97
- **v0.28.4**
98
- * [[TeamMsgExtractor #184](https://github.com/TeamMsgExtractor/msg-extractor/issues/184)] Added code to `Message` to ensure subjects with null characters get stripped of them.
99
- * Moved code for stripping subjects of bad characters to `prepareFilename` in `utils`.
100
-
101
- **v0.28.3**
102
- * Fixed minor typo in an exception description.
103
- * Updated the README this time. Forgot to do it for at least 1 update.
104
-
105
- **v0.28.2**
106
- * Started preparing more of the code for when HTML and RTF saving are fully implemented. Please note that they do not work at all right now. Commented out the code for this because it wasn't meant to be uncommented.
107
- * [[TeamMsgExtractor #184](https://github.com/TeamMsgExtractor/msg-extractor/issues/184)] Added code to ensure file names don't have null characters when saving an attachment.
108
- * Minor improvement to the section of the save code that checks if you have provided incompatible options.
109
- * [[TeamMsgExtractor #185](https://github.com/TeamMsgExtractor/msg-extractor/issues/185)] Added the `IncompatibleOptionsError`. It was supposed to be added a few updates ago, but was accidentally left out.
110
- * Modified `Message.save` to return the current `Message` instance to allow for chained commands. This allows you to do something like `extract_msg.openMsg("path/to/message.msg").save().close()` where you could not before.
111
-
112
- **v0.28.1**
113
- * [[TeamMsgExtractor #181](https://github.com/TeamMsgExtractor/msg-extractor/issues/181)] Fixed issue in `Attachment` that arose when moving some of the code to a base class.
114
- * Fixed small error in `utils.parse_type` that caused it to incorrectly compare expected and actual length. Fortunately, this had no actual effect aside from a warning.
115
- * Added the `ebcdic` module to the requirements to add more supported encodings.
116
-
117
- **v0.28.0**
118
- * [[TeamMsgExtractor #87](https://github.com/TeamMsgExtractor/msg-extractor/issues/87)] Added a new system to handle `NotImplementedError` and other exceptions. All msg classes now have an option called `attachmentErrorBehavior` that tells the class what to do if it has an error. The value should be one of three constants: `ATTACHMENT_ERROR_THROW`, `ATTACHMENT_ERROR_NOT_IMPLEMENTED`, or `ATTACHMENT_ERROR_BROKEN`. `ATTACHMENT_ERROR_THROW` tells the class to not catch and exceptions and just let the user handle them. `ATTACHMENT_ERROR_NOT_IMPLEMENTED` tells the class to catch `NotImplementedError` exceptions and put an instance of `UnsupportedAttachment` in place of a regular attachment. `ATTACHMENT_ERROR_BROKEN` tells the class to catch *all* exceptions and either replace the attachment with `UnsupportedAttachment` if it is a `NotImplementedError` or `BrokenAttachment` for all other exceptions. With both of those options, caught exceptions will be logged.
119
- * In making the previous point work, much code from `Attachment` has been moved to a new class called `AttachmentBase`. Both `BrokenAttachment` and `UnsupportedAttachment` are subclasses of `AttachmentBase` meaning data can be extracted from their streams in the same way as a functioning attachment.
120
- * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Pretty sure I actually got it this time. The execution flag should be applied by pip now.
121
- * Fixed typos in some exceptions
122
-
123
- **v0.27.16**
124
- * [[TeamMsgExtractor #177](https://github.com/TeamMsgExtractor/msg-extractor/issues/177)] Fixed incorrect struct being used. It should be the correct one now, but further testing will be required to confirm this.
125
- * Fixed log error message in `extract_msg.prop` to actually format a value into the message.
126
-
127
- **v0.27.15**
128
- * [[TeamMsgExtractor #177](https://github.com/TeamMsgExtractor/msg-extractor/issues/177)] Fixed missing import.
129
-
130
- **v0.27.14**
131
- * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Fixed typo that I made in the last version that broke things. I didn't have the resources to test this one myself, unfortunately.
132
- * Fixed a typo in an exception message.
133
-
134
- **v0.27.13**
135
- * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Moved some data used in checks into constants so that I can make sure they get changed every where that they are used. Hopefully I can close this issue.
136
-
137
- **v0.27.12**
138
- * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Made an assumption about where an exception was thrown from and was wrong. While that location would have throw an exception, the function that called that code was the one to actually throw the exception in question. This issue *should* be fixed...
139
- * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Made another attempt to fix the execution flag on the wrapper script.
140
-
141
- **v0.27.11**
142
- * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Tentatively implemented type 0x1014 (PtypMultipleInteger64). Apparently I forgot to do it earlier.
143
-
144
- **v0.27.10**
145
- * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Fixed line endings in the wrapper script to be UNIX line endings rather than Windows line endings. Attempted to add the execution flag to the runnable script.
146
-
147
- **v0.27.9**
148
- * [[TeamMsgExtractor #161](https://github.com/TeamMsgExtractor/msg-extractor/issues/161)] Added commands to the command line that will allow the user to specify that they want the message data to be output to stdout rather than to a file.
149
- * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Added a wrapper for extract_msg that will be installed.
150
- * Fixed some of the encoding names to allow them to actually be used in Python. The names they previously held were not aliases that currently exist.
151
- * Added more documentation to `constants.CODE_PAGES` to give more information about what it is. As it is a list of the possible encodings an msg file can use, I also specified which ones were supported by Python 3.
152
- * Moved the main code into a function so it is now callable from outside of the file.
153
-
154
- **v0.27.8**
155
- * [[TeamMsgExtractor #158](https://github.com/TeamMsgExtractor/msg-extractor/issues/158)] Fixed a spelling error in a function name that was causing it to not be seen. The function was called `ceilDiv` but was accidentally called as `cielDiv`.
156
-
157
- **v0.27.7**
158
- * Fixed an issue in the new bitwise adjustment functions. One of the variable names was incorrect.
159
-
160
- **v0.27.6**
161
- * Fixed a few lines in `data.py`.
162
-
163
- **v0.27.5**
164
- * Fixed an error in `utils.divide` that would cause it to drop the extra data if there was not enough to create a full division. For example, if you had a string that was 10 characters, and divided by 3, you would only receive a total of 9 characters back.
165
- * Added some useful functions that will be used in the future.
166
- * [[TeamMsgExtractor #155](https://github.com/TeamMsgExtractor/msg-extractor/issues/155)] Updated to use new version of tzlocal.
167
- * Updated changelog to fit new repository.
168
-
169
- **v0.27.4**
170
- * [[TeamMsgExtractor #152](https://github.com/TeamMsgExtractor/msg-extractor/issues/152)] Fixed an issue where the name of an exception was put as the wrong thing.
171
-
172
- **v0.27.3**
173
- * [[TeamMsgExtractor #105](https://github.com/TeamMsgExtractor/msg-extractor/issues/105)] Added code to fix an internal msg issue that had recipient lists being split up in the header after a certain amount of characters. This was now a bug on our part, but an issue with the generation of the msg file itself.
174
- * Exposed the `MessageBase` class directly from `extract_msg`. I forgot to do this when I created it.
175
- * Added `MessageBase.bcc`. I think it used to exist but got erased somehow on accident. Either way, it exists now.
176
-
177
- **v0.27.2**
178
- * After much debate, I have finally decided to allow an option to override the string encoding in message files. This Was something I reserved solely for `dev_classes.Message` because it felt like it didn't fit with how msg files were supposed to work. I also didn't want messages from people about them running into errors after they overrode the encoding. You can now do this by providing the `overrideEncoding` option on any `MSGFile` class as well as the `openMsg` function.
179
- * [[TeamMsgExtractor #103](https://github.com/TeamMsgExtractor/msg-extractor/issues/103)] Implemented correct detection of encodings. If you have any more issues with "'X' codec can't decode bytes" it is likely because the encoding specified inside the msg file is wrong.
180
-
181
- **v0.27.1**
182
- * [[TeamMsgExtractor #147](https://github.com/TeamMsgExtractor/msg-extractor/issues/147)] Fixed an issue in `Message.save` caused by it attempting to directly access a private variable that was moved to the base class `MessageBase`.
183
-
184
- **v0.27.0**
185
- * [[TeamMsgExtractor #143](https://github.com/TeamMsgExtractor/msg-extractor/issues/143)] Added new class `Appointment` that can handle outlook appointments or meetings.
186
- * [[TeamMsgExtractor #143](https://github.com/TeamMsgExtractor/msg-extractor/issues/143)] Added new class `MessageBase` for classes that end up being mostly like the `Message` class. Currently subclassed by `Message` and `Appointment`. This should not have a direct effect on any code that uses this module.
187
- * Added support for `PtypFloatingTime` in `utils.parseType`.
188
- * Added proper support for `PtypTime` in `FixedLengthProp.parseType`
189
- * Added pretty print functions to the `Properties` class and the `Named` class.
190
- * Added new function `MSGFile._ensureSetProperty` that acts like `MSGFile._ensureSet` except that it works with properties from the `Properties` instance.
191
- * Added equivalent of the previously mentioned function to the `Attachment` class and the `Recipient` class.
192
-
193
- **v0.26.4**
194
- * Added new function `MSGFile._ensureSetNamed` which acts like `MSGFile._ensureSet` except that it works with named properties.
195
- * Added a version of the previous function to the `Attachment` and `Recipient` classes.
196
- * Added new file `data.py` that contains various data structures that are used for specific properties.
197
- * Expanded the functionality of the `Recipient` class by adding more properties.
198
- * Added new functions `Named.getNamed` and `Named.getNamedValue` which retrieves a named property or the value of a named property, respectively, based on its name.
199
-
200
- **v0.26.3**
201
- * Added new function `MSGFile.save` that causes it and subclasses to raise a `NotImplementedError` if they do not override it.
202
- * Fixed some issues in the changelog.
203
- * Added some additional constants for future use.
204
-
205
- **v0.26.2**
206
- * Fixed error in `Message._registerNamedProperty` where I put the exception `KeyError` instead of `AttributeError`.
207
-
208
- **v0.26.1**
209
- * Fixed an issue in `openMsg` that would leave the basic `MSGFile` instance open with the function returned, even if the function was returning a specific msg instance.
210
-
211
- **v0.26.0**
212
- * [[TheElementalOfDestruction #3](https://github.com/TheElementalOfDestruction/msg-extractor/issues/3)] Implementation of Named properties has finally been added. This allows us to access certain data that was not available to us before through regular methods.
213
- * Added new function `MSGFile.slistDir` that acts like `MSGFile.listDir`, except that it returns a list of strings rather than a list of lists.
214
- * [[TheElementalOfDestruction #6](https://github.com/TheElementalOfDestruction/msg-extractor/issues/6)] Added new function `MSGFile._getTypedStream` which, based on a path formatted in the same way as you would give to `MSGFile._getStringStream`, will return the data in the specified stream without the user needing to know the type before hand. However, if you DO know the type before hand, you can provide this function with one of the values in `constants.FIXED_LENGTH_PROPS_STRING` or `constants.VARIABLE_LENGTH_PROPS_STRING`.
215
- * [[TheElementalOfDestruction #6](https://github.com/TheElementalOfDestruction/msg-extractor/issues/6)] Added new function `MSGFile._getTypedProperty` which, based on a 4 digit hexadecimal string, will return the property in the properties file that matches that string without the type needing to be specified. However, if you DO know the type before hand, you can provide this function with one of the values in `constants.FIXED_LENGTH_PROPS_STRING` or `constants.VARIABLE_LENGTH_PROPS_STRING`.
216
- * [[TheElementalOfDestruction #6](https://github.com/TheElementalOfDestruction/msg-extractor/issues/6)] Added new function `MSGFile._getTypedData` which is a combination of the two previously stated functions.
217
- * Added new function `MSGFile.ExistsTypedProperty` which determines if a property with the specified id exists in the specified location. If you are looking for a property that may be in the properties file of an attachment or a recipient, please use the corresponding function from that class.
218
- * Added an equivalent of the previous 4 functions for the `Recipient` and `Attachment` classes.
219
- * [[TheElementalOfDestruction #2](https://github.com/TheElementalOfDestruction/msg-extractor/issues/2)] Finished partial implementation of `utils.parseType` which was necessary for the proper implementation of named properties. This function is not fully implemented because there are some types we do not fully understand.
220
-
221
- **v0.25.3**
222
- * [[TeamMsgExtractor #138](https://github.com/TeamMsgExtractor/msg-extractor/issues/138)] Fixed missing import in `extract_msg/utils.py`.
223
-
224
- **v0.25.2**
225
- * [[TeamMsgExtractor #134](https://github.com/TeamMsgExtractor/msg-extractor/issues/134)] Fixed a typo that caused `Message.headerDict` to raise an exception.
226
- * Upgraded code for `Message.headerDict` to avoid accidentally raising a key error if the header is ever missing the "Received" property.
227
- * Fixed an error in the changelog that caused some issue links to link to the wrong place.
228
-
229
- **v0.25.1**
230
- * [[TeamMsgExtractor #132](https://github.com/TeamMsgExtractor/msg-extractor/issues/132)] Fixed an issue caused by unfinished code being left in the \_\_main\_\_ file.
231
- * Cleaned up the imports to only be what is needed.
232
-
233
- **v0.25.0**
234
- * Added new class `MSGFile`. The `Message` class now inherits from this. This class is the base for all MSG files, not just `Message`s. It somewhat recently came to our attention that MSG files are used for a variety of things, including the storage of contacts, leading us to the next part of the changelog.
235
- * [[TeamMsgExtractor #110](https://github.com/TeamMsgExtractor/msg-extractor/issues/110)] Added new class `Contact` for extracting the data from MSG files storing contacts.
236
- * Added new function `openMsg` to the module to be used to open MSG files in which it is not certain what type of MSG is being opened.
237
- * Modified the `Attachment` class to use the `openMsg` function to open embedded MSG files.
238
- * Added option `delayAttachments` to the `Message` class that will stop it from initializing attachments until the user is ready. This allows users to open `Message`s that have unimplemented attachment types without having to worry about the exception stopping them. This is also an option in the new `openMsg` function.
239
-
240
- **v0.24.4**
241
- * Added new property `Message.isRead` to show whether the email has been marked as read.
242
- * Renamed `Message.header_dict` to `Message.headerDict` to better match naming conventions.
243
- * Renamed `Message.message_id` to `Message.messageId` to better match naming conventions.
244
-
245
- **v0.24.3**
246
- * Added new close function to the `Message` class to ensure that all embedded `Message` instances get closed as well. Not having this was causing issues with trying to modify the msg file after the user thought that it had been closed.
247
-
248
- **v0.24.2**
249
- * Fixed bug that somehow escaped detection that caused certain properties to not work.
250
- * Fixed bug with embedded msg files introduced in v0.24.0
251
-
252
- **v0.24.0**
253
- * [[TeamMsgExtractor #107](https://github.com/TeamMsgExtractor/msg-extractor/issues/107)] Rewrote the `Messsage.save` function to fix many errors arising from it and to extend its functionality.
254
- * Added new function `isEmptyString` to check if a string passed to it is `None` or is empty.
255
-
256
- **v0.23.4**
257
- * [[TeamMsgExtractor #112](https://github.com/TeamMsgExtractor/msg-extractor/issues/112)] Changed method used to get the message from an exception to make it compatible with Python 2 and 3.
258
- * [[TheElementalOfDestruction #23](https://github.com/TheElementalOfDestruction/msg-extractor/issues/23)] General cleanup and all around improvements of the code.
259
-
260
- **v0.23.3**
261
- * Fixed issues in readme.
262
- * [[TheElementalOfDestruction #22](https://github.com/TheElementalOfDestruction/msg-extractor/issues/22)] Updated `dev_classes.Message` to better match the current `Message` class.
263
- * Fixed bad links in changelog.
264
- * [[TeamMsgExtractor #95](https://github.com/TeamMsgExtractor/msg-extractor/issues/95)] Added fallback encoding as well as manual encoding change to `dev_classes.Message`.
265
-
266
- **v0.23.1**
267
- * Fixed issue with embedded msg files caused by the changes in v0.23.0.
268
-
269
- **v0.23.0**
270
- * [[TeamMsgExtractor #75](https://github.com/TeamMsgExtractor/msg-extractor/issues/75)] & [[TheElementalOfDestruction #19](https://github.com/TheElementalOfDestruction/msg-extractor/issues/19)] Completely rewrote the function `Message._getStringStream`. This was done for two reasons. The first was to make it actually work with msg files that have their strings encoded in a non-Unicode encoding. The second reason was to make it so that it better reflected msg specification which says that ALL strings in a file will be either Unicode or non-Unicode, but not both. Because of the second part, the `prefer` option has been removed.
271
- * As part of fixing the two issues in the previous change, we have added two new properties:
272
- 1. a boolean `Message.areStringsUnicode` which tells if the strings are Unicode encoded.
273
- 2. A string `Message.stringEncoding` which tells what the encoding is. This is used by the `Message._getStringStream` to determine how to decode the data into a string.
274
-
275
- **v0.22.1**
276
- * [[TeamMsgExtractor #69](https://github.com/TeamMsgExtractor/msg-extractor/issues/69)] Fixed date format not being up to standard.
277
- * Fixed a minor spelling error in the code.
278
-
279
- **v0.22.0**
280
- * [[TheElementalOfDestruction #18](https://github.com/TheElementalOfDestruction/msg-extractor/issues/18)] Added `--validate` option.
281
- * [[TheElementalOfDestruction #16](https://github.com/TheElementalOfDestruction/msg-extractor/issues/16)] Moved all dev code into its own scripts. Use `--dev` to use from the command line.
282
- * [[TeamMsgExtractor #67](https://github.com/TeamMsgExtractor/msg-extractor/issues/67)] Added compatibility module to enforce Unicode os functions.
283
- * Added new function to `Message` class: `Message.sExists`. This function checks if a string stream exists. It's input should be formatted identically to that of `Message._getStringStream`.
284
- * Added new function to `Message` class: `Message.fix_path`. This function will add the proper prefix to the path (if the `prefix` parameter is true) and adjust the path to be a string rather than a list or tuple.
285
- * Added new function to `utils.py`: `get_full_class_name`. This function returns a string containing the module name and the class name of any instance of any class. It is returned in the format of `{module}.{class}`.
286
- * Added a sort of alias of `Message._getStream`, `Message._getStringStream`, `Message.Exists`, and `Message.sExists` to `Attachment` and `Recipient`. These functions run inside the associated attachment directory or recipient directory, respectively.
287
- * Added a fix to an issue introduced in an earlier version caused by accidentally deleting a letter in the code.
288
-
289
- **v0.21.0**
290
- * [[TheElementalOfDestruction #12](https://github.com/TheElementalOfDestruction/msg-extractor/issues/12)] Changed debug code to use logging module.
291
- * [[TheElementalOfDestruction #17](https://github.com/TheElementalOfDestruction/msg-extractor/issues/17)] Fixed Attachment class using wrong properties file location in embedded msg files.
292
- * [[TheElementalOfDestruction #11](https://github.com/TheElementalOfDestruction/msg-extractor/issues/11)] Improved handling of command line arguments using argparse module.
293
- * [[TheElementalOfDestruction #16](https://github.com/TheElementalOfDestruction/msg-extractor/issues/16)] Started work on moving developer code into its own script.
294
- * [[TeamMsgExtractor #63](https://github.com/TeamMsgExtractor/msg-extractor/issues/63)] Fixed JSON saving not applying to embedded msg files.
295
- * [[TeamMsgExtractor #55](https://github.com/TeamMsgExtractor/msg-extractor/issues/55)] Added fix for recipient sometimes missing email address.
296
- * [[TeamMsgExtractor #65](https://github.com/TeamMsgExtractor/msg-extractor/issues/65)] Added fix for special characters in recipient names.
297
- * Module now raises a custom exception (instead of just `IOError`) if the input is not a valid OLE file.
298
- * Added `header_dict` property to the `Message` class.
299
- * General minor bug fixes.
300
- * Fixed a section in the `Recipient` class that I have no idea why I did it that way. If errors start randomly occurring with it, this fix is why.
301
-
302
- **v0.20.8**
303
- * Fixed a tab issue and parameter type in `message.py`.
304
-
305
-
306
- **v0.20.7**
307
-
308
- * Separated classes into their own files to make things more manageable.
309
- * Placed `__doc__` back inside of `__init__.py`.
310
- * Rewrote the `Prop` class to be two different classes that extend from a base class.
311
- * Made decent progress on completing the `parse_type` function of the `FixedLengthProp` class (formerly a function of the `Prop` class).
312
- * Improved exception handling code throughout most of the module.
313
- * Updated the `.gitignore`.
314
- * Updated README.
315
- * Added `# DEBUG` comments before debugging lines to make them easier to find in the future.
316
- * Added function `create_prop` in `prop.py` which should be used for creating what used to be an instance of the `Prop` class.
317
- * Added more constants to reflect some of the changes made.
318
- * Fixed a major bug that was causing the header to generate after things like "to" and "cc" which would force those fields to not use the header.
319
- * Fixed the debug variable.
320
- * Fixed many small bugs in many of the classes.
321
- * [[TheElementalOfDestruction #13](https://github.com/TheElementalOfDestruction/msg-extractor/issues/13)] Various loose ends to enhance the workflow in the repo.
1
+ **v0.29.7**
2
+ * Fixed a bug in `MSGFile._getTypedStream()` that prevented it from exiting a loop early on failure to access stream.
3
+ * Fixed a bug in `MSGFile._getTypedStream()` that caused it to check if the same stream exists multiple times.
4
+
5
+ **v0.29.6**
6
+ * Corrected error string for incompatible options in `Message.save`.
7
+
8
+ **v0.29.5**
9
+ * [[TeamMsgExtractor #232](https://github.com/TeamMsgExtractor/msg-extractor/issues/232)] Updated list of known MSG class types so the module would correctly give `UnsupportedMSGTypeError` instead of `UnrecognizedMSGTypeError`.
10
+
11
+ **v0.29.4**
12
+ * Fixed typo in `utils.knownMsgClass`.
13
+ * Updated contributing guidelines and pull request template.
14
+
15
+ **v0.29.3**
16
+ * [[TeamMsgExtractor #226](https://github.com/TeamMsgExtractor/msg-extractor/issues/198)] Fix typo in command parsing that prevented the usage of `allowFallback`.
17
+ * Fixed main still manually navigating to a new directory with os.chdir instead of using `customPath`.
18
+ * Fixed issue in main where the `--html` option was being using for both html *and* rtf. This meant if you wanted rtf it would not have used it, and if you wanted html it would have thrown an error.
19
+ * Fixed `--out-name` having no effect.
20
+ * Fixed `--out` having no effect.
21
+
22
+ **v0.29.2**
23
+ * Fixed issue where the RTF injection was accidentally doing HTML escapes for non-encapsulated streams and *not* doing escapes for encapsulated streams.
24
+ * Fixed name error in `Message.save` causing bad logic. For context, the internal variable `zip` was renamed to `_zip` to avoid a name conflict with the built-in function. Some instances of it were missed.
25
+
26
+ **v0.29.1**
27
+ * [[TeamMsgExtractor #198](https://github.com/TeamMsgExtractor/msg-extractor/issues/198)] Added a feature to save the header in it's own file (prefers the full raw header if it can find it, otherwise puts in a generated one) that was actually supposed to be in v0.29.0 but I forgot, lol.
28
+
29
+ **v0.29.0**
30
+ * [[TeamMsgExtractor #207](https://github.com/TeamMsgExtractor/msg-extractor/issues/207)] Made it so that unspecified dates are handled properly. For clarification, an unspecified date is a custom value in MSG files for dates that means that the date is unspecified. It is distinctly different from a property not existing, which will still return None. For unspecified dates, `datetime.datetime.max` is returned. While perhaps not the best solution, it will have to do for now.
31
+ * Fixed an issue where `utils.parseType` was returning a string for the date when it makes more sense to return an actual datetime instance.
32
+ * [[TeamMsgExtractor #165](https://github.com/TeamMsgExtractor/msg-extractor/issues/165)] [[TeamMsgExtractor #191](https://github.com/TeamMsgExtractor/msg-extractor/issues/191)] Completely redesigned all existing save functions. You can now properly save to custom locations under custom file names. This change may break existing code for several reasons. First, all arguments have been changed to keyword arguments. Second, a few keyword arguments have been renamed to better fit the naming conventions.
33
+ * [[TeamMsgExtractor #200](https://github.com/TeamMsgExtractor/msg-extractor/issues/200)] Changed imports to use relative imports instead of hard imports where applicable.
34
+ * Updated the save functions to no longer rely on the current working directory to save things. The module now does what it can to use hard pathing so that if you spontaneously change working directory it will not cause problems. This should also allow for saving to be threaded, if I am correct.
35
+ * [[TeamMsgExtractor #197](https://github.com/TeamMsgExtractor/msg-extractor/issues/197)] Added new property `Message.defaultFolderName`. This property returns the default name to be used for a Message if none of the options change the name.
36
+ * [[TeamMsgExtractor #201](https://github.com/TeamMsgExtractor/msg-extractor/issues/201)] Fixed an issue where if the class type was all caps it would not be recognized. According to the documentation the comparisons should have been case insensitive, but I must have misread it at some point.
37
+ * [[TeamMsgExtractor #202](https://github.com/TeamMsgExtractor/msg-extractor/issues/202)] Module will now handle path lengths in a semi-intelligent way to determine how best to save the MSG files. Default path length max is 255.
38
+ * [[TeamMsgExtractor #203](https://github.com/TeamMsgExtractor/msg-extractor/issues/203)] Fixed an issue where having multiple "." characters in your file name would cause the directories to be incorrectly named when using the `useFileName` (now `useMsgFilename`) argument in the save function.
39
+ * [[TeamMsgExtractor #204](https://github.com/TeamMsgExtractor/msg-extractor/issues/204)] Fixed an issue where the failsafe name used by attachments wasn't being encoded before hand causing encoding errors.
40
+ * MSG files with a type of simply `IPM` will now be returned as `MSGFile` by `openMsg`, as this specifies that no format has been specified.
41
+ * [[TeamMsgExtractor #214](https://github.com/TeamMsgExtractor/msg-extractor/issues/214)] Attachments that error because the MSG class type wasn't recognized or isn't supported will now correctly be `UnsupportedAttachment` instead of `BrokenAttachment`.
42
+ * Improved internal code in many functions to make them faster and more efficient.
43
+ * `openMsg` will now tell you if a class type is simply unsupported rather than unrecognized. If it is found in the list, the function will raise `UnsupportedMSGTypeError`.
44
+ * Added caching to `MSGFile.listDir`. I found that if you have larger files this single function might be taking up over half of the processing time because of how many times it is used in the module.
45
+ * Fully implemented raw saving.
46
+ * Extended the `Contact` class to have more properties.
47
+ * Added new function `MSGFile._ensureSetTyped` which acts like the other ensure set functions but doesn't require you to know the type. Prefer to use other ensure set function when you know exactly what type it will be.
48
+ * Changed `Message.saveRaw` to `MSGFile.saveRaw`.
49
+ * Changed `MSGFile.saveRaw` to take a path and save the contents to a zip file.
50
+ * Corrected the help doc to reflect the current repository (was still on mattgwwalker).
51
+ * Fixed a bug that would cause an exception on trying to access the RTF body on a file that didn't have one. This is now correctly returning `None`.
52
+ * The `raw` keyword of `Message.save` now actually works.
53
+ * Added property `Attachment.randomFilename` which allows you to get the randomly generated name for attachments that don't have a usable one otherwise.
54
+ * Added function `Attachment.regenerateRandomName` for creating a new random name if necessary.
55
+ * Added function `Attachment.getFilename`. This function is used to get the name an attachment will be saved with given the specified arguments. Arguments are identical to `Attachment.save`.
56
+ * Changed pull requests to reflect new style.
57
+ * Added additional properties for defined MSG file fields.
58
+ * Added zip file support for the `Attachment.save` and `Message.save`. Simply pass a path for the `zip` keyword argument and it will create a new `ZipFile` instance and save all of it's data inside there. Alternatively, you can pass an instance of a class that is either a `ZipFile` or `ZipFile`-like and it will simply use that. When this argument is defined, the `customPath` argument refers to the path inside the zip file.
59
+ * Added the `html` and `rtf` keywords to `Message.save`. These will attempt to save the body in the html or rtf format, respectively. If the program cannot save in those formats, it will raise an exception unless the `allowFallback` keyword argument is `True`.
60
+ * Changed `utils.hasLen` to use `hasattr` instead of the try-except method it was using.
61
+ * Added new option `recipientSeparator` to `MessageBase` allowing you to specify a custom recipient separator (default is ";" to match Microsoft Outlook).
62
+ * Changed the `openMsg` function in `Attachment` to not be strict. This allows you to actually open the MSG file even if we don't recognize the type of embedded MSG that is being used.
63
+ * Attempted to normalize encoding names throughout the module so that a certain encoding will only show up using one name and not multiple.
64
+ * Finally figured out what CRC32 algorithm is used in named properties after directly asking in a Microsoft forum (see the thread [here](https://docs.microsoft.com/en-us/answers/questions/574894/ms-oxmsg-specifies-the-use-of-crc-32-checksums-wit.html)). Fortunately the is already defined in the `compressed-rtf` module so we can take advantage of that.
65
+ * Reworked `MessageBase._genRecipient` to improve it (because what on earth was that code it was using before?). Variables in the function are now more descriptive. Added comments in several places.
66
+ * Many renames to better fit naming convention:
67
+ * `dev.setup_dev_logger` to `dev.setupDevLogger`.
68
+ * `MSGFile.fix_path` to `MSGFile.fixPath`.
69
+ * `MessageBase.save_attachments` to `MessageBase.saveAttachments`.
70
+ * `*.Exists` to `exists`.
71
+ * `*.ExistsTypedProperty` to `*.existsTypedProperty`.
72
+ * `prop.create_prop` to `prop.createProp`.
73
+ * `Properties.attachment_count` to `Properties.attachmentCount`.
74
+ * `Properties.next_attachment_id` to `Properties.nextAttachmentId`.
75
+ * `Properties.next_recipient_id` to `Properties.nextRecipientId`.
76
+ * `Properties.recipient_count` to `Properties.recipientCount`.
77
+ * `utils.get_command_args` to `utils.getCommandArgs`.
78
+ * `utils.get_full_class_name` to `utils.getFullClassName`.
79
+ * `utils.get_input` to `utils.getInput`.
80
+ * `utils.has_len` to `utils.hasLen`.
81
+ * `utils.setup_logging` to `utils.setupLogging`.
82
+ * `constants.int_to_data_type` to `constants.intToDataType`.
83
+ * `constants.int_to_intelligence` to `constants.intToIntelligence`.
84
+ * `constants.int_to_recipient_type` to `constants.intToRecipientType`.
85
+ * Misc internal function variables.
86
+
87
+ **v0.28.7**
88
+ * Added hex versions of the `MULTIPLE_X_BYTES` constants.
89
+ * Added `1048` to `constants.MULTIPLE_16_BYTES`
90
+ * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] rewrote the parsing of the length in `VariableLengthProp.__init__` to use constants rather than values coded directly into the function. This should fix this issue.
91
+
92
+ **v0.28.6**
93
+ * [[TeamMsgExtractor #191](https://github.com/TeamMsgExtractor/msg-extractor/issues/191)] This feature was never properly implemented, so it's not officially supported. However, this specific issue should be fixed. This is a temporary patch until I can get around to rewriting the way the module saves files in general.
94
+ * Added `venv` to the .gitignore list.
95
+ * Added information to the readme.
96
+
97
+ **v0.28.5**
98
+ * [[TeamMsgExtractor #189](https://github.com/TeamMsgExtractor/msg-extractor/issues/189)] Forgot to import `prepareFilename` in `attachment.py`.
99
+ * Fixed bad link in the changelog.
100
+
101
+ **v0.28.4**
102
+ * [[TeamMsgExtractor #184](https://github.com/TeamMsgExtractor/msg-extractor/issues/184)] Added code to `Message` to ensure subjects with null characters get stripped of them.
103
+ * Moved code for stripping subjects of bad characters to `prepareFilename` in `utils`.
104
+
105
+ **v0.28.3**
106
+ * Fixed minor typo in an exception description.
107
+ * Updated the README this time. Forgot to do it for at least 1 update.
108
+
109
+ **v0.28.2**
110
+ * Started preparing more of the code for when HTML and RTF saving are fully implemented. Please note that they do not work at all right now. Commented out the code for this because it wasn't meant to be uncommented.
111
+ * [[TeamMsgExtractor #184](https://github.com/TeamMsgExtractor/msg-extractor/issues/184)] Added code to ensure file names don't have null characters when saving an attachment.
112
+ * Minor improvement to the section of the save code that checks if you have provided incompatible options.
113
+ * [[TeamMsgExtractor #185](https://github.com/TeamMsgExtractor/msg-extractor/issues/185)] Added the `IncompatibleOptionsError`. It was supposed to be added a few updates ago, but was accidentally left out.
114
+ * Modified `Message.save` to return the current `Message` instance to allow for chained commands. This allows you to do something like `extract_msg.openMsg("path/to/message.msg").save().close()` where you could not before.
115
+
116
+ **v0.28.1**
117
+ * [[TeamMsgExtractor #181](https://github.com/TeamMsgExtractor/msg-extractor/issues/181)] Fixed issue in `Attachment` that arose when moving some of the code to a base class.
118
+ * Fixed small error in `utils.parse_type` that caused it to incorrectly compare expected and actual length. Fortunately, this had no actual effect aside from a warning.
119
+ * Added the `ebcdic` module to the requirements to add more supported encodings.
120
+
121
+ **v0.28.0**
122
+ * [[TeamMsgExtractor #87](https://github.com/TeamMsgExtractor/msg-extractor/issues/87)] Added a new system to handle `NotImplementedError` and other exceptions. All msg classes now have an option called `attachmentErrorBehavior` that tells the class what to do if it has an error. The value should be one of three constants: `ATTACHMENT_ERROR_THROW`, `ATTACHMENT_ERROR_NOT_IMPLEMENTED`, or `ATTACHMENT_ERROR_BROKEN`. `ATTACHMENT_ERROR_THROW` tells the class to not catch and exceptions and just let the user handle them. `ATTACHMENT_ERROR_NOT_IMPLEMENTED` tells the class to catch `NotImplementedError` exceptions and put an instance of `UnsupportedAttachment` in place of a regular attachment. `ATTACHMENT_ERROR_BROKEN` tells the class to catch *all* exceptions and either replace the attachment with `UnsupportedAttachment` if it is a `NotImplementedError` or `BrokenAttachment` for all other exceptions. With both of those options, caught exceptions will be logged.
123
+ * In making the previous point work, much code from `Attachment` has been moved to a new class called `AttachmentBase`. Both `BrokenAttachment` and `UnsupportedAttachment` are subclasses of `AttachmentBase` meaning data can be extracted from their streams in the same way as a functioning attachment.
124
+ * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Pretty sure I actually got it this time. The execution flag should be applied by pip now.
125
+ * Fixed typos in some exceptions
126
+
127
+ **v0.27.16**
128
+ * [[TeamMsgExtractor #177](https://github.com/TeamMsgExtractor/msg-extractor/issues/177)] Fixed incorrect struct being used. It should be the correct one now, but further testing will be required to confirm this.
129
+ * Fixed log error message in `extract_msg.prop` to actually format a value into the message.
130
+
131
+ **v0.27.15**
132
+ * [[TeamMsgExtractor #177](https://github.com/TeamMsgExtractor/msg-extractor/issues/177)] Fixed missing import.
133
+
134
+ **v0.27.14**
135
+ * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Fixed typo that I made in the last version that broke things. I didn't have the resources to test this one myself, unfortunately.
136
+ * Fixed a typo in an exception message.
137
+
138
+ **v0.27.13**
139
+ * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Moved some data used in checks into constants so that I can make sure they get changed every where that they are used. Hopefully I can close this issue.
140
+
141
+ **v0.27.12**
142
+ * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Made an assumption about where an exception was thrown from and was wrong. While that location would have throw an exception, the function that called that code was the one to actually throw the exception in question. This issue *should* be fixed...
143
+ * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Made another attempt to fix the execution flag on the wrapper script.
144
+
145
+ **v0.27.11**
146
+ * [[TeamMsgExtractor #173](https://github.com/TeamMsgExtractor/msg-extractor/issues/173)] Tentatively implemented type 0x1014 (PtypMultipleInteger64). Apparently I forgot to do it earlier.
147
+
148
+ **v0.27.10**
149
+ * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Fixed line endings in the wrapper script to be UNIX line endings rather than Windows line endings. Attempted to add the execution flag to the runnable script.
150
+
151
+ **v0.27.9**
152
+ * [[TeamMsgExtractor #161](https://github.com/TeamMsgExtractor/msg-extractor/issues/161)] Added commands to the command line that will allow the user to specify that they want the message data to be output to stdout rather than to a file.
153
+ * [[TeamMsgExtractor #162](https://github.com/TeamMsgExtractor/msg-extractor/issues/162)] Added a wrapper for extract_msg that will be installed.
154
+ * Fixed some of the encoding names to allow them to actually be used in Python. The names they previously held were not aliases that currently exist.
155
+ * Added more documentation to `constants.CODE_PAGES` to give more information about what it is. As it is a list of the possible encodings an msg file can use, I also specified which ones were supported by Python 3.
156
+ * Moved the main code into a function so it is now callable from outside of the file.
157
+
158
+ **v0.27.8**
159
+ * [[TeamMsgExtractor #158](https://github.com/TeamMsgExtractor/msg-extractor/issues/158)] Fixed a spelling error in a function name that was causing it to not be seen. The function was called `ceilDiv` but was accidentally called as `cielDiv`.
160
+
161
+ **v0.27.7**
162
+ * Fixed an issue in the new bitwise adjustment functions. One of the variable names was incorrect.
163
+
164
+ **v0.27.6**
165
+ * Fixed a few lines in `data.py`.
166
+
167
+ **v0.27.5**
168
+ * Fixed an error in `utils.divide` that would cause it to drop the extra data if there was not enough to create a full division. For example, if you had a string that was 10 characters, and divided by 3, you would only receive a total of 9 characters back.
169
+ * Added some useful functions that will be used in the future.
170
+ * [[TeamMsgExtractor #155](https://github.com/TeamMsgExtractor/msg-extractor/issues/155)] Updated to use new version of tzlocal.
171
+ * Updated changelog to fit new repository.
172
+
173
+ **v0.27.4**
174
+ * [[TeamMsgExtractor #152](https://github.com/TeamMsgExtractor/msg-extractor/issues/152)] Fixed an issue where the name of an exception was put as the wrong thing.
175
+
176
+ **v0.27.3**
177
+ * [[TeamMsgExtractor #105](https://github.com/TeamMsgExtractor/msg-extractor/issues/105)] Added code to fix an internal msg issue that had recipient lists being split up in the header after a certain amount of characters. This was now a bug on our part, but an issue with the generation of the msg file itself.
178
+ * Exposed the `MessageBase` class directly from `extract_msg`. I forgot to do this when I created it.
179
+ * Added `MessageBase.bcc`. I think it used to exist but got erased somehow on accident. Either way, it exists now.
180
+
181
+ **v0.27.2**
182
+ * After much debate, I have finally decided to allow an option to override the string encoding in message files. This Was something I reserved solely for `dev_classes.Message` because it felt like it didn't fit with how msg files were supposed to work. I also didn't want messages from people about them running into errors after they overrode the encoding. You can now do this by providing the `overrideEncoding` option on any `MSGFile` class as well as the `openMsg` function.
183
+ * [[TeamMsgExtractor #103](https://github.com/TeamMsgExtractor/msg-extractor/issues/103)] Implemented correct detection of encodings. If you have any more issues with "'X' codec can't decode bytes" it is likely because the encoding specified inside the msg file is wrong.
184
+
185
+ **v0.27.1**
186
+ * [[TeamMsgExtractor #147](https://github.com/TeamMsgExtractor/msg-extractor/issues/147)] Fixed an issue in `Message.save` caused by it attempting to directly access a private variable that was moved to the base class `MessageBase`.
187
+
188
+ **v0.27.0**
189
+ * [[TeamMsgExtractor #143](https://github.com/TeamMsgExtractor/msg-extractor/issues/143)] Added new class `Appointment` that can handle outlook appointments or meetings.
190
+ * [[TeamMsgExtractor #143](https://github.com/TeamMsgExtractor/msg-extractor/issues/143)] Added new class `MessageBase` for classes that end up being mostly like the `Message` class. Currently subclassed by `Message` and `Appointment`. This should not have a direct effect on any code that uses this module.
191
+ * Added support for `PtypFloatingTime` in `utils.parseType`.
192
+ * Added proper support for `PtypTime` in `FixedLengthProp.parseType`
193
+ * Added pretty print functions to the `Properties` class and the `Named` class.
194
+ * Added new function `MSGFile._ensureSetProperty` that acts like `MSGFile._ensureSet` except that it works with properties from the `Properties` instance.
195
+ * Added equivalent of the previously mentioned function to the `Attachment` class and the `Recipient` class.
196
+
197
+ **v0.26.4**
198
+ * Added new function `MSGFile._ensureSetNamed` which acts like `MSGFile._ensureSet` except that it works with named properties.
199
+ * Added a version of the previous function to the `Attachment` and `Recipient` classes.
200
+ * Added new file `data.py` that contains various data structures that are used for specific properties.
201
+ * Expanded the functionality of the `Recipient` class by adding more properties.
202
+ * Added new functions `Named.getNamed` and `Named.getNamedValue` which retrieves a named property or the value of a named property, respectively, based on its name.
203
+
204
+ **v0.26.3**
205
+ * Added new function `MSGFile.save` that causes it and subclasses to raise a `NotImplementedError` if they do not override it.
206
+ * Fixed some issues in the changelog.
207
+ * Added some additional constants for future use.
208
+
209
+ **v0.26.2**
210
+ * Fixed error in `Message._registerNamedProperty` where I put the exception `KeyError` instead of `AttributeError`.
211
+
212
+ **v0.26.1**
213
+ * Fixed an issue in `openMsg` that would leave the basic `MSGFile` instance open with the function returned, even if the function was returning a specific msg instance.
214
+
215
+ **v0.26.0**
216
+ * [[TheElementalOfDestruction #3](https://github.com/TheElementalOfDestruction/msg-extractor/issues/3)] Implementation of Named properties has finally been added. This allows us to access certain data that was not available to us before through regular methods.
217
+ * Added new function `MSGFile.slistDir` that acts like `MSGFile.listDir`, except that it returns a list of strings rather than a list of lists.
218
+ * [[TheElementalOfDestruction #6](https://github.com/TheElementalOfDestruction/msg-extractor/issues/6)] Added new function `MSGFile._getTypedStream` which, based on a path formatted in the same way as you would give to `MSGFile._getStringStream`, will return the data in the specified stream without the user needing to know the type before hand. However, if you DO know the type before hand, you can provide this function with one of the values in `constants.FIXED_LENGTH_PROPS_STRING` or `constants.VARIABLE_LENGTH_PROPS_STRING`.
219
+ * [[TheElementalOfDestruction #6](https://github.com/TheElementalOfDestruction/msg-extractor/issues/6)] Added new function `MSGFile._getTypedProperty` which, based on a 4 digit hexadecimal string, will return the property in the properties file that matches that string without the type needing to be specified. However, if you DO know the type before hand, you can provide this function with one of the values in `constants.FIXED_LENGTH_PROPS_STRING` or `constants.VARIABLE_LENGTH_PROPS_STRING`.
220
+ * [[TheElementalOfDestruction #6](https://github.com/TheElementalOfDestruction/msg-extractor/issues/6)] Added new function `MSGFile._getTypedData` which is a combination of the two previously stated functions.
221
+ * Added new function `MSGFile.ExistsTypedProperty` which determines if a property with the specified id exists in the specified location. If you are looking for a property that may be in the properties file of an attachment or a recipient, please use the corresponding function from that class.
222
+ * Added an equivalent of the previous 4 functions for the `Recipient` and `Attachment` classes.
223
+ * [[TheElementalOfDestruction #2](https://github.com/TheElementalOfDestruction/msg-extractor/issues/2)] Finished partial implementation of `utils.parseType` which was necessary for the proper implementation of named properties. This function is not fully implemented because there are some types we do not fully understand.
224
+
225
+ **v0.25.3**
226
+ * [[TeamMsgExtractor #138](https://github.com/TeamMsgExtractor/msg-extractor/issues/138)] Fixed missing import in `extract_msg/utils.py`.
227
+
228
+ **v0.25.2**
229
+ * [[TeamMsgExtractor #134](https://github.com/TeamMsgExtractor/msg-extractor/issues/134)] Fixed a typo that caused `Message.headerDict` to raise an exception.
230
+ * Upgraded code for `Message.headerDict` to avoid accidentally raising a key error if the header is ever missing the "Received" property.
231
+ * Fixed an error in the changelog that caused some issue links to link to the wrong place.
232
+
233
+ **v0.25.1**
234
+ * [[TeamMsgExtractor #132](https://github.com/TeamMsgExtractor/msg-extractor/issues/132)] Fixed an issue caused by unfinished code being left in the \_\_main\_\_ file.
235
+ * Cleaned up the imports to only be what is needed.
236
+
237
+ **v0.25.0**
238
+ * Added new class `MSGFile`. The `Message` class now inherits from this. This class is the base for all MSG files, not just `Message`s. It somewhat recently came to our attention that MSG files are used for a variety of things, including the storage of contacts, leading us to the next part of the changelog.
239
+ * [[TeamMsgExtractor #110](https://github.com/TeamMsgExtractor/msg-extractor/issues/110)] Added new class `Contact` for extracting the data from MSG files storing contacts.
240
+ * Added new function `openMsg` to the module to be used to open MSG files in which it is not certain what type of MSG is being opened.
241
+ * Modified the `Attachment` class to use the `openMsg` function to open embedded MSG files.
242
+ * Added option `delayAttachments` to the `Message` class that will stop it from initializing attachments until the user is ready. This allows users to open `Message`s that have unimplemented attachment types without having to worry about the exception stopping them. This is also an option in the new `openMsg` function.
243
+
244
+ **v0.24.4**
245
+ * Added new property `Message.isRead` to show whether the email has been marked as read.
246
+ * Renamed `Message.header_dict` to `Message.headerDict` to better match naming conventions.
247
+ * Renamed `Message.message_id` to `Message.messageId` to better match naming conventions.
248
+
249
+ **v0.24.3**
250
+ * Added new close function to the `Message` class to ensure that all embedded `Message` instances get closed as well. Not having this was causing issues with trying to modify the msg file after the user thought that it had been closed.
251
+
252
+ **v0.24.2**
253
+ * Fixed bug that somehow escaped detection that caused certain properties to not work.
254
+ * Fixed bug with embedded msg files introduced in v0.24.0
255
+
256
+ **v0.24.0**
257
+ * [[TeamMsgExtractor #107](https://github.com/TeamMsgExtractor/msg-extractor/issues/107)] Rewrote the `Messsage.save` function to fix many errors arising from it and to extend its functionality.
258
+ * Added new function `isEmptyString` to check if a string passed to it is `None` or is empty.
259
+
260
+ **v0.23.4**
261
+ * [[TeamMsgExtractor #112](https://github.com/TeamMsgExtractor/msg-extractor/issues/112)] Changed method used to get the message from an exception to make it compatible with Python 2 and 3.
262
+ * [[TheElementalOfDestruction #23](https://github.com/TheElementalOfDestruction/msg-extractor/issues/23)] General cleanup and all around improvements of the code.
263
+
264
+ **v0.23.3**
265
+ * Fixed issues in readme.
266
+ * [[TheElementalOfDestruction #22](https://github.com/TheElementalOfDestruction/msg-extractor/issues/22)] Updated `dev_classes.Message` to better match the current `Message` class.
267
+ * Fixed bad links in changelog.
268
+ * [[TeamMsgExtractor #95](https://github.com/TeamMsgExtractor/msg-extractor/issues/95)] Added fallback encoding as well as manual encoding change to `dev_classes.Message`.
269
+
270
+ **v0.23.1**
271
+ * Fixed issue with embedded msg files caused by the changes in v0.23.0.
272
+
273
+ **v0.23.0**
274
+ * [[TeamMsgExtractor #75](https://github.com/TeamMsgExtractor/msg-extractor/issues/75)] & [[TheElementalOfDestruction #19](https://github.com/TheElementalOfDestruction/msg-extractor/issues/19)] Completely rewrote the function `Message._getStringStream`. This was done for two reasons. The first was to make it actually work with msg files that have their strings encoded in a non-Unicode encoding. The second reason was to make it so that it better reflected msg specification which says that ALL strings in a file will be either Unicode or non-Unicode, but not both. Because of the second part, the `prefer` option has been removed.
275
+ * As part of fixing the two issues in the previous change, we have added two new properties:
276
+ 1. a boolean `Message.areStringsUnicode` which tells if the strings are Unicode encoded.
277
+ 2. A string `Message.stringEncoding` which tells what the encoding is. This is used by the `Message._getStringStream` to determine how to decode the data into a string.
278
+
279
+ **v0.22.1**
280
+ * [[TeamMsgExtractor #69](https://github.com/TeamMsgExtractor/msg-extractor/issues/69)] Fixed date format not being up to standard.
281
+ * Fixed a minor spelling error in the code.
282
+
283
+ **v0.22.0**
284
+ * [[TheElementalOfDestruction #18](https://github.com/TheElementalOfDestruction/msg-extractor/issues/18)] Added `--validate` option.
285
+ * [[TheElementalOfDestruction #16](https://github.com/TheElementalOfDestruction/msg-extractor/issues/16)] Moved all dev code into its own scripts. Use `--dev` to use from the command line.
286
+ * [[TeamMsgExtractor #67](https://github.com/TeamMsgExtractor/msg-extractor/issues/67)] Added compatibility module to enforce Unicode os functions.
287
+ * Added new function to `Message` class: `Message.sExists`. This function checks if a string stream exists. It's input should be formatted identically to that of `Message._getStringStream`.
288
+ * Added new function to `Message` class: `Message.fix_path`. This function will add the proper prefix to the path (if the `prefix` parameter is true) and adjust the path to be a string rather than a list or tuple.
289
+ * Added new function to `utils.py`: `get_full_class_name`. This function returns a string containing the module name and the class name of any instance of any class. It is returned in the format of `{module}.{class}`.
290
+ * Added a sort of alias of `Message._getStream`, `Message._getStringStream`, `Message.Exists`, and `Message.sExists` to `Attachment` and `Recipient`. These functions run inside the associated attachment directory or recipient directory, respectively.
291
+ * Added a fix to an issue introduced in an earlier version caused by accidentally deleting a letter in the code.
292
+
293
+ **v0.21.0**
294
+ * [[TheElementalOfDestruction #12](https://github.com/TheElementalOfDestruction/msg-extractor/issues/12)] Changed debug code to use logging module.
295
+ * [[TheElementalOfDestruction #17](https://github.com/TheElementalOfDestruction/msg-extractor/issues/17)] Fixed Attachment class using wrong properties file location in embedded msg files.
296
+ * [[TheElementalOfDestruction #11](https://github.com/TheElementalOfDestruction/msg-extractor/issues/11)] Improved handling of command line arguments using argparse module.
297
+ * [[TheElementalOfDestruction #16](https://github.com/TheElementalOfDestruction/msg-extractor/issues/16)] Started work on moving developer code into its own script.
298
+ * [[TeamMsgExtractor #63](https://github.com/TeamMsgExtractor/msg-extractor/issues/63)] Fixed JSON saving not applying to embedded msg files.
299
+ * [[TeamMsgExtractor #55](https://github.com/TeamMsgExtractor/msg-extractor/issues/55)] Added fix for recipient sometimes missing email address.
300
+ * [[TeamMsgExtractor #65](https://github.com/TeamMsgExtractor/msg-extractor/issues/65)] Added fix for special characters in recipient names.
301
+ * Module now raises a custom exception (instead of just `IOError`) if the input is not a valid OLE file.
302
+ * Added `header_dict` property to the `Message` class.
303
+ * General minor bug fixes.
304
+ * Fixed a section in the `Recipient` class that I have no idea why I did it that way. If errors start randomly occurring with it, this fix is why.
305
+
306
+ **v0.20.8**
307
+ * Fixed a tab issue and parameter type in `message.py`.
308
+
309
+
310
+ **v0.20.7**
311
+
312
+ * Separated classes into their own files to make things more manageable.
313
+ * Placed `__doc__` back inside of `__init__.py`.
314
+ * Rewrote the `Prop` class to be two different classes that extend from a base class.
315
+ * Made decent progress on completing the `parse_type` function of the `FixedLengthProp` class (formerly a function of the `Prop` class).
316
+ * Improved exception handling code throughout most of the module.
317
+ * Updated the `.gitignore`.
318
+ * Updated README.
319
+ * Added `# DEBUG` comments before debugging lines to make them easier to find in the future.
320
+ * Added function `create_prop` in `prop.py` which should be used for creating what used to be an instance of the `Prop` class.
321
+ * Added more constants to reflect some of the changes made.
322
+ * Fixed a major bug that was causing the header to generate after things like "to" and "cc" which would force those fields to not use the header.
323
+ * Fixed the debug variable.
324
+ * Fixed many small bugs in many of the classes.
325
+ * [[TheElementalOfDestruction #13](https://github.com/TheElementalOfDestruction/msg-extractor/issues/13)] Various loose ends to enhance the workflow in the repo.