I have a requirement to create a mailbox kind of thing, for that I need to poll specific inbox of email ids from mail server. I am doing these things using JavaMail. I need to show all mails as inbox type and user can reply/forward those also. I have generated an HTML page with contenteditable div where everything is coming. But inline images are not showing in mail body i.e. within contenteditable div. it's coming as separate attachment. In html source I am seeing that inline images are generally referred as cid:image001 type which is not being referred from my web application. Any idea how can I show those images within mail body? or where those cid:image... exactly exists? Because from outlook or Lotus Notes web mail also it is visible.
What I am seeing is it's coming in the mail body as src="cid:image001". Is it the case that if Content_Id attribute of MIME header will be same of the src... then, image will be loaded inline? While reading from MailServer, doesn't any mail client store the image in any location? If not, how it will load the image? It would be great if you can please elaborate your view.
That isn't the only example those keywords returned, there were a lot more.
Joined: Mar 02, 2013
Thanks for the reply. This example is for embedding inline image while sending a mail. It's setting a content-id in header and picked up the image from physical location like new File("./icon.jpg").
But I am facing problem during reading of a mail with inline image. Mail content is coming fine except the inline image part. "X" mark is coming at that image, that means it's not finding the image from the source mentioned in mail body. Please suggest ideas on it.
SoumyaGh Ghosh wrote:But I am facing problem during reading of a mail with inline image. Mail content is coming fine except the inline image part. "X" mark is coming at that image, that means it's not finding the image from the source mentioned in mail body.
It could also mean that images are not loaded (which is the default for many web mailers). What tool are you using to read the mail?
Also be aware that there are people and/or mail clients out there that refuse to deal with HTML mail, so you'd do well to also provide a text-only mail that has the images as attachment if they're important.
Ping & DNS - updated with new look and Ping home screen widget