Retrieving Images embedded in Inbox Message

Jan 23, 2013 at 12:12 AM

When I receive inbox messages from gmail or hotmail mail providers are replacing img tags with [image=] tags so if it is an HTML mail which includes embedded images (not attachment) I cannot show mail in html format correctly.

Is there any setting or option on HigLibo library or on Mail Provider to always include images in mailMessage.BodyText property?

 

Coordinator
Jan 23, 2013 at 12:59 AM

Hi.

Please check mailMessage.Contents property that may include HTML format mail.
mailMessage.BodyText property return BodyText property of mailMessage.Contents[0].BodyText.

regards.

Jan 23, 2013 at 2:15 AM
Edited Jan 23, 2013 at 2:16 AM

Hi,

I checked that property and unfortunately I am getting same result.

for example image is covered by href is coming like this;

[image:Newegg Logo]<http://e.newegg.com/servlet/cc6?gLmkQTWUUQWVHiitLSxnuHptQJhuVaVRVXLX>

actually in html it should be like

<a href='http://e.newegg.com/servlet/cc6?gLmkQTWUUQWVHiitLSxnuHptQJhuVaVRVXLX'><img src='MISSINGSRC'  alt='Newegg Logo'/></a>

if I go to real inbox in gmail, also gmail does not show images on default, it asks me to whether see all images or not.

But I could not resolve images from API.

 

Coordinator
Jan 23, 2013 at 3:35 AM

Hi.

That is GMail's spec to return such format ( [image=...] ).
You have only way to parse it by yourself.
Please consider to parse it by Regex calss and show it by html.

regards.

Jan 23, 2013 at 11:41 AM

Hi,

But the problem is Gmail or Hotmail is not sending image src tag in the html code.

It is just sending like [image:Newegg Logo]. it does not help me because I need image src tag to show image correctly.

If it is not a setting on HigLibo library probably I would need to check Gmail maybe.

Coordinator
Jan 24, 2013 at 10:59 AM

Maybe so.
Please check mailMessage.Data property.
It returns actual raw data.
If there is no src value, you can not get src value from my library (probaly other library too)
When you need to check GMail settings or other...

regards.


Jan 25, 2013 at 8:35 PM

Hello,

Thanks for help but this one also did not help.

Just you to know I lastly tried http://www.limilabs.com/mail

library and this one is pulling html bodytext %100 accurate. I also tried some other imap libraries none of them work but this.

Your library is great and working very well but did not match my requirement, maybe you want to check imap mail pulling function to get 

html content correctly because there may be some other people want to develop mail client (for smartphones) and using your library may have trouble.

 

Thanks a lot!