1

I am using HigLabo library to get inbox messages from Gmail (imap) or Hotmail (pop3).

My Code is similar to this for gmail;

ImapClient client = new ImapClient(ServerName);
client.UserName = UserName;
client.Password = Password;
client.Port = Port;
client.Ssl = Ssl;
MailMessage mailMessage = client.GetMessage(1);
Console.WriteLine(mailMessage.BodyText);

lets assume this message is a HTML mail coming from newegg. So BodyText property has whole content as html but img elements coming as [image: ] because gmail and hotmail does not send images to my application. to see images user has to go their real inbox and click on "show all images" (which is not the case for my client app)

I am wondering is it a solid rule from mail providers to not to send images coming from "untrusted source" or is there a workaround to get also images and show inbox mails to user properly?

Austin Salonen
  • 49,173
  • 15
  • 109
  • 139
Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158
  • Would Images be considered an Attachment in your app..if so then looks like you will have to get Attachments which should be an Array type.. – MethodMan Jan 22 '13 at 23:41
  • This site may give you some additional ideas [Reading IMAP Mail Boxes](http://binarydelusions.com/2012/03/21/c-reading-imap-boxes-and-saving-attachments/) – MethodMan Jan 22 '13 at 23:47
  • Have you tried sending a Multipart MIME messages with each image as a MIME part? – Dai Jan 22 '13 at 23:48
  • Unfortunately images are not coming as an attachment, gmail or hotmail sends bodyData as html that's fine but it is truncating img elements and replacing them with [image=title] tags. title is the alt tag of the image, so since I lose src attribute cannot show mail message correctly. – Teoman shipahi Jan 23 '13 at 00:09

1 Answers1

1

I am not sure what's wrong with all other API's lastly I gave a shot to this library today;

limilabs mail.dll

and it is fetching mails exactly how it appears on browsers.

Teoman shipahi
  • 47,454
  • 15
  • 134
  • 158