We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Image embedded as a body in a mail

Hello,

I get Mails via Microsoft.Exchange.Data.Transport.MailItem and want store them as msg files. But the problem that I am facing is as follows:-

I have created a RTF or HTML mail having body and attachment both and having some embedded images in the mail body itself through Microsoft Outlook and than I load the mail through Aspose.Network.Mail.MailMessage.Load() method. After loading I used .save() method to save the mail in .msg format.

But when I opened the .msg file I am not able to see the embedded images. Instead of getting the images as embedded image I am getting the image as attachment...

Do you have any way to sort this problem by using Aspose.Network dll ?


Regards,

Atul

Hi Atul,

Thank you for inquiry.

Could you please post a sample source and output message files? We need to reproduce the issue at our end to find/fix the issue.

Hi,

Thanks for quick reply. Please fiind the attachment RTF_Mail_With_Embedded_Images.rar which consists of an RTF_Mail_With_Embedded_Images.eml file which has some embedded image. First open this file in Microsoft Outlook 2010 and see it contains lots of embedded images. convert this eml to msg file as follows.

Aspose.Network.Mail.MailMessage message = Aspose.Network.Mail.MailMessage.Load(“C:\RTF_Mail_With_Embedded_Images.eml”);

message.Save(“C:\RTF_Mail_With_Embedded_Images.msg”, MessageFormat.Msg);

But after using above code when I opened the .msg file I can not file any embedded images.
Just let me know where I am doing wrong ?

Regards,
Atul

Hi Atul,

Thanks for posting the sample file.

I have reproduced the issue at my end, the saved MSG in my case contains some icons instead of the original embedded images. I have logged this bug (ID: 30760). We will look into it and will inform you when it gets fixed. Sorry for the inconvenience.

Hi Saqib,

It would be really nice if you could tell us whether Aspose.Network provides such types of conversion for embedded images as in the sample submitted above. The sample eml that I have submitted is a rtf mail send from Microsoft Outlook. We also wanted to get the above mentioned conversion for HTML mails.

Regards,
Atul

Hi Atul,

Aspose.Network can handle embedded images in HTML and RTF mails (EML/MSG/MHT) for loading, converting and saving operations.

Regarding RTF formatted EML files only, I managed to reproduce lost images issues with some of emails at my end as well. We will look into it.

Please try with HTML mails too at your end and post sample files if you face any issue.

Hi Saqib,



Thanks for your reply. We are facing similar problem for HTML mails too. Please find the attachment HTML mail with attachments and embedded images.rar which contains HTML email sample file. We have similar API call for this conversion as mentioned in my previous reply.



Also can you please let me know that how soon you guys can fix both the
problems. As right now we are in evaluation phase and if we get all our
requirement full filled than we can busy some licenses of Aspose.Network
product.

Regards,
Atul

Hi Atul,

Thanks for sharing the sample. We will analyze it and will inform you when it gets fixed.

Hello Shqib,

It would be really nice if you could tell us the expected date of this fix. Since we are evaluating many products so we can not hold for long time. If your fix date will fall in our release date than only we can buy Aspose licenses.

Waiting for reply.

Thanks
Atul

Hi Atul,

We are working on this issue and will try our best to roll out the fix in the coming version, which will be published by the end of this month, September 2011.

If it does not gets fixed this week, then it will be included in the next month’s release, October 2011.

Hello Saqib,

Any progress on this ? Is it fixed in September release ?

Regards,
Atul

Hi Atul,

I am sorry the fix for this issue will be provided in the October release (will be published by the end of this month).

The issues you have found earlier (filed as 30760 ) have been fixed in this update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.

Hi Saqib,

Did you guys tested the fix with the file that I have submitted in this mail thread ?

Actually I have tried to test it at my end but it seems that fix is not working as expected. I have attaches the input eml file (RTF_Mail_With_Embedded_Images.eml) and resultant .MSG file (temp.msg) after conversion. You can clearly see that after conversion embedded images does not preserves and we get some “Picture(Device Independent Image)” place holder instead of actual embed image.
Please see the attachment.

Thanks

Hi Atul,

I got a different result with v1.1. Please see the attached file after conversion. The source message was TNEF formatted, the attachments and embedded images are stored in a different way, so after conversion to MSG format, we could import the embedded images, but still they are not displayed like source message and can be viewed when you double click to open.

Hi Saqib,

Could you please post a sample source code or Aspsoe API calls that you have used to save the message in .MSG format through which you got this output file ?

Also, the output that you have shared does not have the similar look and feel as the original mail.
So are you saying that there has no way through which we can get .MSG file similar to input file ?

Regards,
Atul

I used the below code:

MailMessage eml = MailMessage.Load(“RTF_Mail_With_Embedded_Images.eml”, MessageFormat.Eml);
eml.Save(“output.msg”, MailMessageSaveType.OutlookMessageFormat);

I will also check again with the development team for making the look and feel similar to the original one.

Hi Saqib,

Unfortunately on my side I am unable to get the same output as you are getting and I am still getting a place holder named as “Picture (Device Independent Bitmap)” instead of actual image imported.

Any idea why Aspose.Email is showing this dual behavior ?

I am testing Aspsoe.Email on following environment-
Windows Server 2008 R2 Enterprise
Microsoft Office Professional Plus 2010 (Version 14.0.6.6106.5005 32 bit )


Also, It would be really nice if we get the similar look and feel as input feel. And as per my knowledge there are some other tools like “EML to MSG” tool from ITBits which are able to achieve the same thing and are able to provide the similar look and feel.

Thanks,
Atul

Regards,
Atul

Hi Atul,

I previously used VS 2008, Windows 7 x64 and Aspose.Email.dll from bin\3.5 folder.
I also checked with VS 2010, Windows 7 x64 and Aspose.Email.dll from bin.net4Client_Profile, the result was same. I have attached the sample application.

I have logged another issue (ID: 31700) for this, we will see what can be done to make it similar to the original.

Hi Saqib,

I am not sure what is going wrong on my machine but I am still getting a place holder named as “Picture (Device Independent Bitmap)” instead of actual image imported.

Can you point me an area where I might be doing something wrong ? Is this related to Windows 2k8 server that I am using ? Can you also test the Aspose.Email binary in Windows 2k8 R2 Enterprise system at your end ?

Also the issue that you have logged (ID: 31700) yesterday, any idea till when it will be fixed ? Any time frame ?
Regards,
Atul