0 votes
by (150 points)
edited

Hi

I'm currently using a trial version of your secure mail components, trying to write a webmail prototype. So far all have been good, but I have encountered problems with inline pictures.

I can stream out the content from the resources-property of the MailMessage-object just fine, but when applying the content of the BodyHTML-property to innerhtml of a 'div', I only get an outline of the picture, but without the picture itself.

Have I misunderstood something? Should I save the inline pictures to disk before they can be shown?

I have tried in IE, Firefox and Chrome.

1 Answer

0 votes
by (73.5k points)
edited
 
Best answer

Saving linked images to disk is not necessary, but it is faster for a client (but more difficult for you).

How to display linked images without saving them to disk is show in this sample application (see the ShowMessageDetail method).

Basically you always need to replace original HTML body fragments <img src="cid:XYZ"> with something like this <img src="/images/XYZ"> or this <img src="/GetImage.aspx?cid=XYZ">. The first replacement is needed when you save linked image to disk. The second replacement is needed when you send the linked image to a client on the fly.

by (150 points)
Had a bad feeling this would be needed, so just implemented it like that. But did really not like the idea of changing the body. Never worked with e-mail applications before, guess I just hoped inline pictures would be something beautiful and a magically easy thing. Thanks a lot for the reply - this issue were the last, so looks like we will upgrade.
...