HTML (eml) and embedded images

  • When creating an email in html format, and it has embedded images the code in the html referencing the image needs to be

    Zitat

    <img src=cid:

    I've found the place in WPIOHTML to alter to achieve this

    Zitat

    // Before WRITE HTML Images
    if fnam <> '' then
    begin
    WriteString('<img src="');
    WriteString(fnam);
    WriteString('"');

    ImageAlign;

    but I hate altering purchased code (mainly on the basis of new versions needing alteration) so I wonder if there's another way to achieve this?

  • Nothing anyone else will be able to use I'm afraid. I'm managing images myself.

    One thing I found with WPTools if I embedded several copies of an images it actually had several copies held in the document rather than one so I store them in a database along with the document essentially allowing WPTools to think they are linked rather than embedded.

    I then wrote the code for the event handler called when WPTools wants to display the image and finally, since this bit is for emails I simply do a StringReplace changing all <img src= to <img src=cid: when encoding the email.

    I hold the document and the encoded message separately (a bit of data duplication but who cares) and everything works well.