-
Notifications
You must be signed in to change notification settings - Fork 81
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CSV export with Message Body #10
Comments
Add Body and NativeBody to dictionary to export them.
Generally, I agree that this would be useful. The problem is the format. Bodies come in three main formats: plain text; HTML; and RTF (Word document format). What should I export them as? I had a look around, but couldn't come up with anything compelling in the way of a common format. Another consideration in the HTML case - what should I do with embedded graphics, which Outlook transports as hidden attachments? Dijji |
I think these three format is put in different column in CVS file.
IMHO , HTML embedded graphics should be ignored, because no attachments are exported. |
I'm not a big fan of adding a mix of columns to the CSV file, where some are meant for humans to read, and some for programs. I think we should stick to making the CSV file human readable, and if we want program readable formats, export them separately. I also think that if we have a plain text column in the CSV file, then the program should make a decent effort at providing text whatever the email format. For plain text, this is trivial. For HTML, most browsers support a means of extracting text from a web page, although this might make extraction run rather slowly. For RTF, Microsoft Word would give a text conversion, but this would be an annoying dependency to take. Maybe there is an open source alternative for this. Having got this far, it all sounds pretty tricky. But if I consider the alternative that you have coded up, I'm not sure what on earth would consume compressed RTF, or the streamed form of HTML. What do you believe the use cases for these formats are? Dijji |
My concern is importing all the messages from .ost file to Outlook. To do so, I can do following steps:
I almost finished work for this and published in my repositories. At this end, I'm also agreeing CSV file is just for humans. Instead, exporting eml file should be more direct way. Though, I'm not familiar with C# so much, that I need more time to contribute that task. I'm also noticed exporting properties is not best fit for my purpose because properties do not include To and Cc information. I realized that I need exporting 'contents' instead of 'properties', if exporting eml is too specific requirement. About RTF contents, I also noticed that issue and worked out for it. Finally, I export it as an attached file with extension of rt. I can click the attached file then MS word preview plugin automatically show the contents, and it is enough to salvage message. |
Very interesting. I'll have a look at your code and see if I can figure it out, although your C# might be better than my Python! Dijji |
I've been looking at your code, and I'm afraid I'm rather puzzled. So, the path is XstReader to CSV to eml.
It may just be that I'm missing your point. Please enlighten me if so. Dijji |
I choosed eml simply because I know the format very well, as I am very old man and knows well As you mentioned that V1.7 has an extension to save a message with attached file in another issue, I feel it works. Anyway, I will check it whether it fit for me. (But at now, I'm so busy that it will be a few weeks/months later) |
Hi, I need to get some MAPIproperties, but I co uld find a function to do it. |
Are you by any chance looking at the CSV file using Excel? There appears to be a problem with properties that contain a new line character messing up Excel CSV import in UTF-8 encoded files. To confirm, export the properties for a message and look at the CSV file in a text editor. It is a bit hard to read, but if you count the headings to the first EntryId property, and then count to the corresponding data field, you should see the value in hexadecimal, just as you do if you display message properties in the UI. |
…encoded with UTF-8, so remove them (see #10)
Release version 1.13 contains a fix that will cause Excel to open exported CSV files correctly |
Currently only properties of messages are exported, but not message body.
UserEntryId is a part of the body but the length of contents are very limited.
It is very useful if Body and/or NativeBody are exported.
The text was updated successfully, but these errors were encountered: