Search code examples
delphiemailattachmentembedded-browser

How to provide cid email attachments to embedded browser


I'm using embedded web browser from Bsalsa to write an email client in Delphi

I have a problem with cid embedded attachments such as:

<IMG src="cid:5D4219C71EAE43B1864AE9CB27C224A8@somehost">

I store the attachments in the database but can't figure out how to provide them to the browser. It seems custom moniker might need to be implemented but the documentation is scarce.

Any help would be appreciated.


Solution

  • I've implemented it using a "pluggable protocol" handler and it's easier thant it looks. Start here: http://msdn.microsoft.com/en-us/library/aa767916(VS.85).aspx and here: http://www.bsalsa.com/protocols.html

    I am sorry I can't share the code I wrote but it's written for the company I work for and I have restrictions about it. Basically you need a com object that implements the proper interface to get the data and allow the web browser control read them.

    That's IMHO the correct way to do it - altering the mail and storing temporary data may bring issue in the long run.