Gmail, Hotmail does not send images in mail content using imap or pop3

590 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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.