Get MSG property by property's hex name

Here is the right link, sorry for my mistakes

[http://www.aspose.com/products/Aspose.Network/Releases/Aspose.Network_beta_v3515.zip](https://forum.aspose.com/products/Aspose.Network/Releases/Aspose.Network_beta_v3515.zip)

Hello,

We have provided supporting to render the embedded ole object in the html body in the latest hotfix. Please check it out.

New features:

  • Add attachments in head of the htmlbody if any attachment exists.
  • Render <> in the html body for Ole embedded object
  • Other Rft engine fixes

[http://www.aspose.com/products/Aspose.Network/Releases/Aspose.Network.v3.5.1.8.zip](https://forum.aspose.com/products/Aspose.Network/Releases/Aspose.Network.v3.5.1.8.zip)

Sample output for embedded ole object message file:

=====================================================

From: Bai, Becky

Sent: 6/14/2007 12:57:35 AM

To: Bai, Becky

Subject: Embedded Ole files

Attachments: Microsoft PowerPoint PresentationMicrosoft PowerPoint Presentation(1)Microsoft PowerPoint Presentation(1)PackagePackage(1)

An embedded ppt:

An embedded pps (powerpoint slides):

An embedded pot (powerpoint template)

An embedded txt file:

An embedded msg file:

Becky Bai

FTI Consulting

412-680-8245

bbai@fticonsulting.com

Hi, I couldn't find the all the posts to this thread, only the first page shows. Do you know what happened to the forum?

Thanks!

Hi, I tested the mht output, it is really coming along!

Here are some questions:

1. can you break each attachment to its own line? Right now they are all crammed together.

2. can you list only the file attachments in the attachment header (not include the ole objects)?

3. looks like sometimes attachment name sometimes gets abbreviated in the mht, please see the attached. Can you show the full name of the attachment file?

4. The attached msg has an excel spread sheet pasted in it, in the mht, the table is not rendered correctly. Please see attached.

5. If email is in RTF format, the attachment appears inline, sometimes in the mht, a placeholder gets inserted in the message, but sometimes there is no placeholder. Can you check out the attached files and see why they behave inconsistently?

Thank you!

  1. Please visit the home page of Aspose.Network, and use the page index of this post to access previous threads.

[http://www.aspose.com/Community/Forums/188/ShowForum.aspx](https://forum.aspose.com/Community/Forums/188/ShowForum.aspx)

  1. Could you please evaluate the latest hotfix for Aspose.Network. Let me know if it works.

Thanks

There seems to have some problem uploading files. (7MB). Can I send you the example files via email?

Thanks.

Becky

Could you send to my yahoo mailbox, asposeguangzhou$$yahoo.com.cn

Thanks

Somethings else I noticed in the mht output:

1. the mht file size is very large, because it contains all the data for the attachments as well, can the attachment file data be stripped out?

2. I noticed that in the attachment header, if there is an embedded email, the item will be listed as having an extension .eml, can we just list the email title without the extension?

3. Can we have all the dates in GMT, or having a choice of making it GMT while saving to mht?

4. For calendar items, can we having the following header fields in the mht?

Subject, Location, Start, End, Recurrence, Meeting Status (e.g. accepted), Required Attendees.

5. It looks like extra line breaks are added to the mht, can we strip then out ?( e.g. the blank lines between header fields)

6. My last post requested having each attachment list in seperate line, that's not necessary as long as they are semi-colon delimited.

7. My last post requested getting rid of the ole objects from the attachment list, I think it is not a big deal if we leave them there.

Thanks and please let me know if you want example files for these cases.

See the inline

1. the mht file size is very large, because it contains all the data for the attachments as well, can the attachment file data be stripped out?

[iret: Yes, it's a good point. We will support this.]

2. I noticed that in the attachment header, if there is an embedded email, the item will be listed as having an extension .eml, can we just list the email title without the extension?

[iret: It is not a hard issue, we will fix it in some ways. Because we load the Outlook messages in MailMessage class first. MailMessage will try to convert all the embedded Msg file to Eml file, then save into the attachment. Finally, when we use MailMessage.Save to mht file, the email title will have .eml extension. I will find a solution for this. Maybe add a Save to MaipMessage directly, without using MailMessage as a bridge. Therefore, we can provide more specified converting setting in MapiMessage->Mht ]

3. Can we have all the dates in GMT, or having a choice of making it GMT while saving to mht?

[iret: Yes, It is possible. We will provide an interface for some field rendering format]

4. For calendar items, can we having the following header fields in the mht?

Subject, Location, Start, End, Recurrence, Meeting Status (e.g. accepted), Required Attendees.

[iret: For calendar, we need to investigate the solution. I will follow up.]

5. It looks like extra line breaks are added to the mht, can we strip then out ?( e.g. the blank lines between header fields)

[iret: Yes. It is possible.]

6. My last post requested having each attachment list in seperate line, that's not necessary as long as they are semi-colon delimited.

7. My last post requested getting rid of the ole objects from the attachment list, I think it is not a big deal if we leave them there.

Thanks and please let me know if you want example files for these cases.

Besides what Becky has mentioned I have a couple more question about extracting embedded objects:

ole2 types: Can we get the name of these files in the ole information?
ole1 types: Instead of providing a OleStream which we talked about can you provide us with a similar solution to what was provided from the Aspose.Words team? See the following thread:

[http://www.aspose.com/Community/Forums/80510/ShowThread.aspx#80510](https://forum.aspose.com/Community/Forums/80510/ShowThread.aspx#80510)

Thanks,
Nathan

Actually, we have already supported Ole1 types in the latest hotfix. The content of the Ole1 type document has been extracted to a byte[].

Thanks

Hi Iret,

I am wondering when are you going to have your next release/beta release, so we can try the things we have mentioned?

About the placeholder for embedded objects and attachments, we want to do the following:

1. Can we have placeholders inserted where attachments are in RTF email? In html email, it is not necessary, because all attachments are only listed in the header anyways.

2. Can we have placeholders inserted where OLE objects are? For OLE object that's embedded as content (i.e. you can see, for example, the excel worksheet inside the image), ideally, we want them rendered in the output mht; for OLE object that's embedded as icon, we would like them to be extractable and replaced with a placeholder. If the RTF rendering engine you are working on is not ready yet, can we have both types of OLE replaced with placeholders in the mht output? Is it possible to programmatically differentiate these two types, better yet, do you see it is possible we can choose, while output to mht, whether to have the ole being rendered or being replace by placeholder?

3. For all placeholders, can we have file name instead of the generic application name if file name is available?

4. Is it possible to render the icons that represents the embedded file/attachment as you can see them in msg?

Thanks!

We need to get status on these items. We are in mid-qa testing and are getting pressure for these changes and need to have an idea where you guys are at with them.

Thank you,
Nathan

Dear Nathan,

Thanks for your considering Aspose.Network.

We’ve anounced an official release today, which contains many features requested by you guys.

[http://www.aspose.com/Community/Blogs/aspose.network/archive/2007/07/11/Aspose_Network_3_5_2_0_Released.aspx](https://forum.aspose.com/Community/Blogs/aspose.network/archive/2007/07/11/Aspose_Network_3_5_2_0_Released.aspx)

Please check it out.

In this hotfix, we support:

  1. Support rendering placeholder in htmlbody, including OLE1 files and other office document.

  2. Do not support render file name in this version.

  3. Do not support render icon in this version.

  4. Support removing attachment while saving mht files

Thanks

Hi Iret,

We are trying the new release and have the following questions so far, the attached has the example files for each question. Thanks!

Question 1: I tried a couple of msg files, looks like embedded picture are only extractable if email is in Html format. If email is in Rtf, then embedded picture is neither rendered nor extractable. Can you check on that? Another related question is: Our goal is to render embedded content (like picture, embedded chart, xls worksheet) within the mht, since they are rendered then there is no need to extract them. For embedded icons (a file is embedded), we need a placeholder in the mht, and the object being extractable. Is it possible? Or, another way we can do it is: extract all embedded ole objects, and they all have placeholder indicating where the extracted files are coming from. Please do let me know if you want me to explain more on this and if you need more sample files.

Question 2: Pasted Excel in Html Msg not rendered in the correct format.

Question 3: Can we show the full file name of the attachments in the email header? Currently some of them are abbreviated. Also can we get rid of the extra line breaks in the header?

Question 4: The attached html email has an embedded excel, currently Aspose don’t render it in the mht, but can extract it. Is it possible to make a placeholder there?

Question 5: Can we have placeholders (with proper file names) for email attachment in RTF formatted email?

Question 6: How do I use the MhtMessageFormatter to set the Date preference is UTC?

MhtMessageFormatter mhtFormat = new MhtMessageFormatter();
mhtFormat.SaveAttachments = false;
mhtFormat.DateTimeFormat = "yyyy-MM-dd HH:mm:ss";
message.Save(outputFilePath, MessageFormat.Mht, mhtFormat);

Question 1: We donot support embedded images by now. There is techincal dificulties in rendering embedded contents within the mht formatted message. For example, extracting different ole formats content (word/excel/powerpoint, images) are hard. We need more time to work on it. We have supported adding placeholder in the mht message for the embedded objects.

Question 2: It's a bug in rendering table, we will fix it.

Question 3: Yes, we will try to fix this.

Question 4: I think it is possible. I will investigate to see if we can add a placeholder.

Question 5:What do you mean RTF formatted email? Are you talking the MapiMessage.BodyRtf property? Could you please explain this.

Question 6:

f.DateTimeFormat = "yyyy-mm-ddThh:mmzzz";

Thanks Iret.

Question 1: For the example I sent in my last post, the image didn't get rendered in mht, nor was it extracted (or having placeholder). Can you check on that?

Question 5: I create RTF email by setting the Message Format to "Rich Text" ( as opposed of "Html" or "Plain Text"). In RTF formatted email, the attachment appears inline of the email message. So what I was asking is to have placeholders for those attachments in mht (so we can see where the attachments were). My last post contains examples (in folder \Question5\).

Question 6: I used the DateTimeFormat you showed, but some weird dates generated in the mht, can you please verify? (e.f. I got dates like 2007-55-06T09:55-04:00, 2007-59-08T02:59-04:00).

Thanks again for looking into these!

Question 1: the embedded image cannot be renderred in the current version. it is confirmed that it is a bug in the extracting method. We are now working on the bug fixing.

Question 5: ok, I will look into it.

Question 6: what format do you want to show? Could you please provide a format sample ? I thought you want to get some thing like 2007-59-08T02:59-04:00, so I provide the previus format. Give me the UTC format sample will do.

Thanks

Hi Iret,

I have attached example for Question 6, I don't think the date rendered is a valid date.

Becky

Please use the format string : yyyy-MM-ddThh:mmzzz,

the MM means month, mm means minutes, sorry for my mistakes.

Sample code:

DateTime dt = DateTime.Now;
Console.WriteLine(dt.ToString("yyyy-MM-ddThh:mmzzz"));