none
Email template with an image RRS feed

  • Question

  • Hi,

    I would create an email template with an image embedded.

    I created the email template with outlook on my PC. The body is the following.

    <body lang=EN-US link=blue vlink=purple><div align=right style='text-align:right'><!--[if gte vml 1]><v:shapetype id="_x0000_t75" coordsize="21600,21600" o:spt="75" o:preferrelative="t" path="m@4@5l@4@11@9@11@9@5xe" filled="f" stroked="f">
    <v:stroke joinstyle="miter" />
    <v:formulas>
    <v:f eqn="if lineDrawn pixelLineWidth 0" />
    <v:f eqn="sum @0 1 0" />
    <v:f eqn="sum 0 0 @1" />
    <v:f eqn="prod @2 1 2" />
    <v:f eqn="prod @3 21600 pixelWidth" />
    <v:f eqn="prod @3 21600 pixelHeight" />
    <v:f eqn="sum @0 0 1" />
    <v:f eqn="prod @6 1 2" />
    <v:f eqn="prod @7 21600 pixelWidth" />
    <v:f eqn="sum @8 21600 0" />
    <v:f eqn="prod @7 21600 pixelHeight" />
    <v:f eqn="sum @10 21600 0" />
    </v:formulas>
    <v:path o:extrusionok="f" gradientshapeok="t" o:connecttype="rect" />
    <o:lock v:ext="edit" aspectratio="t" />
    </v:shapetype><v:shape id="Picture_x0020_1" o:spid="_x0000_s1026" type="#_x0000_t75" alt="Description: LOGOXYZ_resized" style='position:absolute;left:0;text-align:left;margin-left:62.8pt;margin-top:0;width:114pt;height:68.25pt;z-index:251658240;visibility:visible;
    <v:imagedata src="cid:image001.png@01CD96B8.DE079480" o:title="LOGOXYZ_resized" croptop="4024f" cropbottom="9198f" cropleft="10723f" cropright="9533f" />
    <w:wrap type="square"/>
    </v:shape><![endif]--><![if !vml]><img width=152 height=91 src="cid:image003.png@01CD96B8.E166C510" align=right hspace=12 alt="Description: LOGOXYZ_resized" v:shapes="Picture_x0020_1"><![endif]><b><u><span lang=IT style='color:black'><o:p></o:p></span></u></b></p><p style='<b><u><span lang=IT>SI RACCOMANDA DI LEGGERE ATTENTAMENTE QUESTA LETTERA E DI CONSERVARLA</span></u></b><span lang=IT style='color:black'><o:p></o:p></span></p><p style='<span lang=IT style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p style='<span lang=IT>Si comunica che sono state attivate le credenziali di [//Target/LastName] [//Target/FirstName] per l'accesso alla Rete.<span style='color:#1F497D'><o:p></o:p></span></span></p><p style='<b>Scadenza: </b><span lang=IT>[//Target/EmployeeEndDate]</span><b>&nbsp;</b><span style='color:#1F497D'><o:p></o:p></span></p><table border=0 cellspacing=0 cellpadding=0 style='border-collapse:collapse'><tr><td width=225 valign=top style='width:168.5pt;border:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'><p align=center style='text-align:center'><b>Applicazione</b><o:p></o:p></p></td><td width=225 valign=top style='width:168.55pt;border:solid windowtext 1.0pt;border-left:none;padding:0cm 5.4pt 0cm 5.4pt'><p align=center style='text-align:center'><b>Nome utente</b><o:p></o:p></p></td><td width=225 valign=top style='width:168.55pt;border:solid windowtext :p></o:p></span></p></td><td width=225 valign=top style='width:168.55pt;border-top:none;border-left:none;border-bottom:solid windowtext 1.0pt;border-right:solid windowtext 1.0pt;padding:0cm 5.4pt 0cm 5.4pt'><p align=center style='text-align:center'><span lang=IT>[//Target/ADInitialPassword]<o:p></o:p></span></p></td></tr></table><p style='<span style='color:black'><o:p>&nbsp;</o:p></span></p><p style='<span lang=IT style='color:black'>Per eventuali ulteriori informazioni contattare il SSIT all’indirizzo ABC@XYZ.net.</span><span lang=IT><o:p></o:p></span></p></div></body>

    Then I exported this template to the FIM Portal server, in the "Email Template" administration section on the Portal.

    Where must I put the image to allow FIM to link it? Which attribute have I to modify with the correct path (src?)? And how?

    Can you provide me some examples of the correct form of the path attribute?

    Thank u very much.

    Francesca

    Thursday, September 20, 2012 9:28 PM

Answers

  • The problem with using "cid" for embedded images is that the email message needs to be formatted differently. You don't have control over the header, mime type and other aspects that need to be defined to include and reference a "cid image" in the message body.

    First, the message header will need to have the following fields:

    From: foo@bar.net
    To: nobody@bar.net
    Subject: Test example
    Mime-Version: 1.0
    Content-Type: multipart/related; boundary="boundary-name"; type="text/html"

    The "boundary" is what separates the content of the message to form the "multipart/related" pieces.

    The message body then has boundary markers and additional content headers to define the individual pieces:

    --boundary-name
    Content-Type: text/html; charset="US-ASCII"
    
    This is an HTML document, which contains a URI
    referencing a resource in another body part, for example
    through a statement such as:
    <img src="cid:myImage" ALT="Big Smiles">
    
    --boundary-name
    Content-Location: CID:blahblah ; this header is not used
    Content-ID: <myImage>
    Content-Type: image/jpeg
    Content-Transfer-Encoding: BASE64
    
    /9j/4AAQSkZJRgABAQEASABIAAD/4QJQRXhpZgAATU0AKgAAAAgACgEPAAIAAAAUAAAAhgEQAAIA
    AAAJAAAAmgEaAAUAAAABAAAApAEbAAUAAAABAAAArAEoAAMAAAABAAIAAAExAAIAAAASAAAAtAEy
    AAIAAAAUAAAAxgITAAMAAAABAAEAAIdpAAQAAAABAAAA2sSlAAcAAAAQAAAB/gAAAg5TYW1zdW5n
    IEVsZWN0cm9uaWNzAFNHSC1BODY3AAAAAABIAAAAAQAAAEgAAAABUGFpbnQuTkVUIHYzLjUuMTAA
    MjAxMjowODoxMiAyMzoxODoyOAAAEYgiAAMAAAABAAIAAJAAAAcAAAAEMDIyMJADAAIAAAAUAAAB
    rJAEAAIAAAAUAAABwJEBAAcAAAAEAQIDAJIBAAoAAAABAAAB1JIHAAMAAAABAAEAAKAAAAcAAAAE
    MDEwMKABAAMAAAABAAEAAKACAAQAAAABAAAGAKADAAQAAAABAAAIAKAFAAQAAAABAAAB3KMAAAcA
    AAABAwAAAKMBAAcAAAABAQAAAKQBAAMAAAABAAEAAKQCAAMAAAABAAAAAKQDAAMAAAABAAEAAAAA
    AAAyMDEyOjA4OjEyIDE0OjU3OjI1ADIwMTI6MDg6MTIgMTQ6NTc6MjUAAAAMAAAABAAAAgABAAIA
    AAAEUjk4AAACAAcAAAAEMDEwMAAAAAAAAAAAUHJpbnRJTQAwMzAwAAAAAAADARoABQAAAAEAAAI4
    ARsABQAAAAEAAAJAASg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npu34PGPapZMPHyc
    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
    YnHSuNyqdDtVGErx --boundary-name--

    The HTML references the embedded content-id via the special "cid" URI. This is the same method used for email attachments. Using the "cid" allows an attachment to be rendered as content in the body of the email.

    Since this would already require you to know the underlying mime type of the image, you already need to have the image data converted to Base64 encoding, and you don't have any control over the headers of an email template in FIM... you would need to write your own email activity and not use the out-of-the-box FIM activities. The other method of getting an email to embed an image is to use the special "data:mime-type" URI in the src attribute of an img tag:

    The same image shown above can be placed inline like so:

    <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QJQRXhpZgAATU0AKgAAAAgACgEPAAIAAAAUAAAAhgEQAAIA
    AAAJAAAAmgEaAAUAAAABAAAApAEbAAUAAAABAAAArAEoAAMAAAABAAIAAAExAAIAAAASAAAAtAEy
    AAIAAAAUAAAAxgITAAMAAAABAAEAAIdpAAQAAAABAAAA2sSlAAcAAAAQAAAB/gAAAg5TYW1zdW5n
    IEVsZWN0cm9uaWNzAFNHSC1BODY3AAAAAABIAAAAAQAAAEgAAAABUGFpbnQuTkVUIHYzLjUuMTAA
    MjAxMjowODoxMiAyMzoxODoyOAAAEYgiAAMAAAABAAIAAJAAAAcAAAAEMDIyMJADAAIAAAAUAAAB
    rJAEAAIAAAAUAAABwJEBAAcAAAAEAQIDAJIBAAoAAAABAAAB1JIHAAMAAAABAAEAAKAAAAcAAAAE
    MDEwMKABAAMAAAABAAEAAKACAAQAAAABAAAGAKADAAQAAAABAAAIAKAFAAQAAAABAAAB3KMAAAcA
    AAABAwAAAKMBAAcAAAABAQAAAKQBAAMAAAABAAEAAKQCAAMAAAABAAAAAKQDAAMAAAABAAEAAAAA
    AAAyMDEyOjA4OjEyIDE0OjU3OjI1ADIwMTI6MDg6MTIgMTQ6NTc6MjUAAAAMAAAABAAAAgABAAIA
    AAAEUjk4AAACAAcAAAAEMDEwMAAAAAAAAAAAUHJpbnRJTQAwMzAwAAAAAAADARoABQAAAAEAAAI4
    ARsABQAAAAEAAAJAASgAAwAAAAEAAgAAAAAAAAAAAEgAAAABAAAASAAAAAH/2wBDAAIBAQIBAQIC
    AgICAgICAwUDAwMDAwYEBAMFBwYHBwcGBwcICQsJCAgKCAcHCg0KCgsMDAwMBwkODw0MDgsMDAz/
    2wBDA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HF6HLJJpLY
    bLhOhxnvRDaoVJGeaiklJPpinpMIIx3xWsoy0VzOnGCmAgRHYcHjNWra2MpA7VT2GeTeFxitrw/Z
    GYgH8aHDoHKnLa5t6PYqI0J5A/KofEd0udqdBWxGEtbQj+L6Vx3ii9MDMQe/rTS5LWY5wlpZGTq8
    ytMSRjiodPhDtuHaq8lz9qJx1NX7W3WCHryazSlN6nTOMIU7ou2x/dk9cdqcg8wgelRo3lxD1NTx
    ncoA496rks7nIrShykkbEIV6k1B5SwvuPrUvO3AbJqrdXW2M57VsptbkypR08jK8TSi7iYEfNyAa
    5m2VpmKjr/KtjU7oMWO6qPh2Atcu7D5TwD71pH4TjnBOtfqUrmI22QRiremSB0HoO1WNXtlaI560
    3R1W3iIKne3qKh8rTTNo03TmmWZJDhQh5zznrj296bfBvIBzz+vFTRhXc7sgiq08zSTf7PaiKSXK
    TNc03UI4ZCeH6euKZdQmQZGCP1qwsJU5J+lMRBJLjPGax5eV3Om/PHlJbOEtBgdcVz+sWpiZkPQn
    v1rtdIt0kXAUYNc345sTb3vHQjAryMfdvmPqMlXLF0znXkSMAFscVGtgHkLZytMumMgCYwT/ADpE
    le3bGBkVxRi7N7Ho+xTldks0ghTABAzj8KtaTcpHqELZ6GqkhLW+WGDmoomEUwcHoeKzhK+jZUaf
    K20j3DStSik0+Pa3y4zTn1BQCQeK8+8M+NI5LZYhJ8yDGKu3nisRAruwT3FdEKi2PPrUG/iOvl1t
    HBG8cfzrNudZTee5zXHz+K2Y4BqOfxCZEznmm5S2GqCdtLs7NvFChQARx71XuNc3tuGAa4OfVpGc
    MCetLda5PsABYgelZQhyat3K9jzy1Wx2i6xtY5K8/pTZdeTcRkZIxiuBk8Qyl8DORznNLDqkkjYY
    gMfeuiNNN+0uS6PLeKidrHqwJ5IyDSvrQEgG6uMk1CSFxghs+/NF3qckaZ3fNilOX8hVLBvlOsm1
    oRS43DFMfxEu71AFchHqxkQ7mwaT+1yOxpdbkywzadkdiuvoSSTxSrq6MMlu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MW5vpI4tqng+1RzXmHwOQO5qW4IX
    B7Cid4/K5UbselS46WE3dtjIr5iOME4qG5dln8z0HSpoCvk5VTmo2g8zdvz7emKVOpZKLRpKm5rm
    uQpqTKxJxlvamvqEss4UcYpLgAuAMjHqKYJtsxJwSfUda0qOUveRFGXJFw7jboIj/PnJ/nUlixZx
    2A4/+uKJ4hOQScEd6SWJoivI+b07Gtoz51Znn+z9i+aK6k1zIY2+RvlPfNVZYzbx5z94fhU8q+TD
    jqelVLqcGEgdBXOvitE7alN25noVppflJJ4qPTpQpLFs4Ofw7VSurpAMbzx61We4MY3DjNepGF4H
    zta8KvMjWa7V3ODkdqSGfzEIIPH51mm9R4AM7WHeqzak0k+NxPlng++KrV6I6adKHKnJ7mheRKcu
    OGH5msK7AkIY8bTn/Cr73284yeB6VSm8sybSD0/SlQT+0YVqacrUylLqLOhI6g1Wa586IFiAQfTt
    V4WiysCB0qtqFnBasBk5I/DrXQ5Ju6WxzWlCS5nYo6+oks2ZDjI/KvM/EFt5kz7/AMK9N1UeTZHb
    8w28153rDpc3gwfmU1MJOE3K50aT9SppTCMLGT93Fei+CbjfAMj2rztJfKnbA6D8cc133hFwLYc8
    moqVG1dIupSV49DodR/eSKo+9t6+1FnbGOQEg5A/AU6G32NvbcpHTIqaGKSRvlbGR/8ArqoTsmjO
    tRfMpPfoWBqKAKkjc56VMtxDEdwPLVRltVtcbjuPQZpECLNls98fhStGNlHqKlRUtWtYmv8A2gJA
    MnoOBTIb4oSMEfTtVAIZDj7oHT3FPLF5Rl1bn8KlqzsaQ11e9yzd6sbVtir1PSlt5vNddxwR3qld
    wiSbcWziprVhM6A4yD+Vc1SbWxvh4e/bc6KxVyMdV96mutPTyxkkk/pUViMR7FPzL1q0rAkK3Ufn
    Xnyk29eh9FSoxUPUqCYWfyj/AOvVPUr77UMHgCtS7tUUhyoJrL1aNCjNnDCqo1Oaepz4qhKFH3Sl
    NeqvAPTikjv9mNxGBVK4RJY2Azk/zqCQsY2UqckYFesqcbK587TxU1JtfM111bzwXjOSvFEeou/z
    Dkis7TpI0TkYOPzqwzFcbBijlTVwqVpLTpuWBq+9SNqhgPxqGC6+Z2Peq8ilHHOKmaMvgqcJiqSS
    d2Y1ak57CW9+zTkZ4zV1IRGwIbr0qpHEiuSPX86tKu+NQOMGtFLd9zmdK9oy6ak7xGQ7nJI9KlNw
    08Z24wBj86ZPFlFwfmP5U+1BgZlxxWWqSZ6E6NrNrcdbzPHEo7E5+lIJftjsnQqalZsMD29MVIY4
    omBUckdhSm1K1gpRlFWRUEYS4VCzdecVanl8qHC4KjtSNbRPMG/i4JzUzQK4ULjC1nJXtY0pJwUu
    frsRaXKHf5RgjpWtqKs0C9cqKy7QCNye47AVpLc+fCwbhj0NTJu5NKSdJ9CiQ23rhgOKfZTNt+fI
    zUywYG5u3T600Qgkeh/Srg76SOWceSScdS1C6LCyMTg0xH3kcVIkKJArHOMcVCr734bGaUd7G9R6
    JNb9B1wrQo2OM0yzJTOOasW9k0/BbG01bi05YY2YnDH+dVKSV0ZU6Dm1JLYrW915UZDKSTzUtxD5
    smegFKLZCuSx61OXQAIO361nG0al4mqg5JxloitaAKSuBuq2DnCgUlukUbE7cY/WrAuIghwRuA/W
    rbbbuZUoqFmvQiUZc4GPWnJEXjDcgHtTi6qRz196mKnH+z/Sphd+9c2nDmVmU2tfNYqw4HSi2tAJ
    dgPT+dWoLlN5zjrSC5QXWRnp27VtHRu3YynH4e1y/bwKUI6cfjVWSwzKRnFWIryNYS5PzelRC8W4
    YnHSuNyqdDtVGErx" alt="Big Smile" />

    This method is mostly supported by most of the common email clients, including Outlook.

    Hope this better explains an alternate solution,

    Friday, September 21, 2012 12:37 PM

All replies

  • Have you looked at using an inline Base64 encoded string rather than trying to craft a multipart related content message?

    <img  width=152 height=91 src="data:image/jpg;base64,/*base64-data-string here*/" align=right hspace=12 alt="Description: LOGOXYZ_resized" />
    
    This method may be easier.
    Thursday, September 20, 2012 9:58 PM
  • Sorry but I don't understand.. I'm new with these issues. Please, can you better explain your approach?

    Thanks in advance.

    Francesca

    Friday, September 21, 2012 7:03 AM
  • The problem with using "cid" for embedded images is that the email message needs to be formatted differently. You don't have control over the header, mime type and other aspects that need to be defined to include and reference a "cid image" in the message body.

    First, the message header will need to have the following fields:

    From: foo@bar.net
    To: nobody@bar.net
    Subject: Test example
    Mime-Version: 1.0
    Content-Type: multipart/related; boundary="boundary-name"; type="text/html"

    The "boundary" is what separates the content of the message to form the "multipart/related" pieces.

    The message body then has boundary markers and additional content headers to define the individual pieces:

    --boundary-name
    Content-Type: text/html; charset="US-ASCII"
    
    This is an HTML document, which contains a URI
    referencing a resource in another body part, for example
    through a statement such as:
    <img src="cid:myImage" ALT="Big Smiles">
    
    --boundary-name
    Content-Location: CID:blahblah ; this header is not used
    Content-ID: <myImage>
    Content-Type: image/jpeg
    Content-Transfer-Encoding: BASE64
    
    /9j/4AAQSkZJRgABAQEASABIAAD/4QJQRXhpZgAATU0AKgAAAAgACgEPAAIAAAAUAAAAhgEQAAIA
    AAAJAAAAmgEaAAUAAAABAAAApAEbAAUAAAABAAAArAEoAAMAAAABAAIAAAExAAIAAAASAAAAtAEy
    AAIAAAAUAAAAxgITAAMAAAABAAEAAIdpAAQAAAABAAAA2sSlAAcAAAAQAAAB/gAAAg5TYW1zdW5n
    IEVsZWN0cm9uaWNzAFNHSC1BODY3AAAAAABIAAAAAQAAAEgAAAABUGFpbnQuTkVUIHYzLjUuMTAA
    MjAxMjowODoxMiAyMzoxODoyOAAAEYgiAAMAAAABAAIAAJAAAAcAAAAEMDIyMJADAAIAAAAUAAAB
    rJAEAAIAAAAUAAABwJEBAAcAAAAEAQIDAJIBAAoAAAABAAAB1JIHAAMAAAABAAEAAKAAAAcAAAAE
    MDEwMKABAAMAAAABAAEAAKACAAQAAAABAAAGAKADAAQAAAABAAAIAKAFAAQAAAABAAAB3KMAAAcA
    AAABAwAAAKMBAAcAAAABAQAAAKQBAAMAAAABAAEAAKQCAAMAAAABAAAAAKQDAAMAAAABA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1NjyhjPIppjDA+9em6e9jzIK2ok0wI
    64B/SoIozLGSDUgG75WGMcfWmyMI4yFOAKzUdLNlOnzatEaqCSC3K9P/AK1SMx8oBRkGq6oZJeMA
    GraR+ZsUHocmsqsLtN6mlNq1oljTrJlAz610Ok6eEkDk9BVXTbQNGuDyDWo8nkRba2pUbxvMxquP
    Ly2KeuSrgqOoqrpSmVSah1GbzpDjPWrVo4t7Pd6CrdJuJlCCg0UtaultYmDcEVxepkSuWxkGtbxX
    qX2mbaD096xWQFQcipkr7GzjdNSIjH5oHJAHt1pFgXf/AFNSiMLEcdetMjYouM8miEHF6HLJJpLY
    bLhOhxnvRDaoVJGeaiklJPpinpMIIx3xWsoy0VzOnGCmAgRHYcHjNWra2MpA7VT2GeTeFxitrw/Z
    GYgH8aHDoHKnLa5t6PYqI0J5A/KofEd0udqdBWxGEtbQj+L6Vx3ii9MDMQe/rTS5LWY5wlpZGTq8
    ytMSRjiodPhDtuHaq8lz9qJx1NX7W3WCHryazSlN6nTOMIU7ou2x/dk9cdqcg8wgelRo3lxD1NTx
    ncoA496rks7nIrShykkbEIV6k1B5SwvuPrUvO3AbJqrdXW2M57VsptbkypR08jK8TSi7iYEfNyAa
    5m2VpmKjr/KtjU7oMWO6qPh2Atcu7D5TwD71pH4TjnBOtfqUrmI22QRiremSB0HoO1WNXtlaI560
    3R1W3iIKne3qKh8rTTNo03TmmWZJDhQh5zznrj296bfBvIBzz+vFTRhXc7sgiq08zSTf7PaiKSXK
    TNc03UI4ZCeH6euKZdQmQZGCP1qwsJU5J+lMRBJLjPGax5eV3Om/PHlJbOEtBgdcVz+sWpiZkPQn
    v1rtdIt0kXAUYNc345sTb3vHQjAryMfdvmPqMlXLF0znXkSMAFscVGtgHkLZytMumMgCYwT/ADpE
    le3bGBkVxRi7N7Ho+xTldks0ghTABAzj8KtaTcpHqELZ6GqkhLW+WGDmoomEUwcHoeKzhK+jZUaf
    K20j3DStSik0+Pa3y4zTn1BQCQeK8+8M+NI5LZYhJ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ceS5v7O0tBfsxlTk4xUfk7Tk9Vp4JD5BpWnDZBoow5F
    aJVuaXvFcRndkdjT5IGMfJp5nXawxSWr5BBHNTOKvdilRUpr8x1vJ5UO304piMN2fWpJEUEc/wD6
    6aEXNHslFadSp0o1I8r6BICy5zVVm2BgO9WlTjnpTJYxnApVUlCyQ/Yc6Vuhnpu34PGPapZMPHyc
    4ptwFR6dFEki8nnvzWUW7pozhGTTpkCgwnI+7SM3nK3HFMvW2uQh+WnRkrDjpkV0ppLnOe0V7jVz
    C1wBZipHIqot4UIH8IFaOvoCB/eH61jhcHnpTS5kc85ezqbaMW5vpI4tqng+1RzXmHwOQO5qW4IX
    B7Cid4/K5UbselS46WE3dtjIr5iOME4qG5dln8z0HSpoCvk5VTmo2g8zdvz7emKVOpZKLRpKm5rm
    uQpqTKxJxlvamvqEss4UcYpLgAuAMjHqKYJtsxJwSfUda0qOUveRFGXJFw7jboIj/PnJ/nUlixZx
    2A4/+uKJ4hOQScEd6SWJoivI+b07Gtoz51Znn+z9i+aK6k1zIY2+RvlPfNVZYzbx5z94fhU8q+TD
    jqelVLqcGEgdBXOvitE7alN25noVppflJJ4qPTpQpLFs4Ofw7VSurpAMbzx61We4MY3DjNepGF4H
    zta8KvMjWa7V3ODkdqSGfzEIIPH51mm9R4AM7WHeqzak0k+NxPlng++KrV6I6adKHKnJ7mheRKcu
    OGH5msK7AkIY8bTn/Cr73284yeB6VSm8sybSD0/SlQT+0YVqacrUylLqLOhI6g1Wa586IFiAQfTt
    V4WiysCB0qtqFnBasBk5I/DrXQ5Ju6WxzWlCS5nYo6+oks2ZDjI/KvM/EFt5kz7/AMK9N1UeTZHb
    8w28153rDpc3gwfmU1MJOE3K50aT9SppTCMLGT93Fei+CbjfAMj2rztJfKnbA6D8cc133hFwLYc8
    moqVG1dIupSV49DodR/eSKo+9t6+1FnbGOQEg5A/AU6G32NvbcpHTIqaGKSRvlbGR/8ArqoTsmjO
    tRfMpPfoWBqKAKkjc56VMtxDEdwPLVR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5zjrSC5QXWRnp27VtHRu3YynH4e1y/bwKUI6cfjVWSwzKRnFWIryNYS5PzelRC8W4
    YnHSuNyqdDtVGErx --boundary-name--

    The HTML references the embedded content-id via the special "cid" URI. This is the same method used for email attachments. Using the "cid" allows an attachment to be rendered as content in the body of the email.

    Since this would already require you to know the underlying mime type of the image, you already need to have the image data converted to Base64 encoding, and you don't have any control over the headers of an email template in FIM... you would need to write your own email activity and not use the out-of-the-box FIM activities. The other method of getting an email to embed an image is to use the special "data:mime-type" URI in the src attribute of an img tag:

    The same image shown above can be placed inline like so:

    <img src="data:image/jpeg;base64,/9j/4AAQSkZJRgABAQEASABIAAD/4QJQRXhpZgAATU0AKgAAAAgACgEPAAIAAAAUAAAAhgEQAAIA
    AAAJAAAAmgEaAAUAAAABAAAApAEbAAUAAAABAAAArAEoAAMAAAABAAIAAAExAAIAAAASAAAAtAEy
    AAIAAAAUAAAAxgITAAMAAAABAAEAAIdpAAQAAAABAAAA2sSlAAcAAAAQAAAB/gAAAg5TYW1zdW5n
    IEVsZWN0cm9uaWNzAFNHSC1BODY3AAAAAABIAAAAAQAAAEgAAAABUGFpbnQuTkVUIHYzLjUuMTAA
    MjAxMjowODoxMiAyMzoxODoyOAAAEYgiAAMAAAABAAIAAJAAAAcAAAAEMDIyMJADAAIAAAAUAAAB
    rJAEAAIAAAAUAAABwJEBAAcAAAAEAQIDAJIBAAoAAAABAAAB1JIHAAMAAAABAAEAAKAAAAcAAAAE
    MDEwMKABAAMAAAABAAEAAKACAAQAAAABAAAGAKADAAQAAAABAAAIAKAFAAQAAAABAAAB3KMAAAcA
    AAABAwAAAKMBAAcAAAABAQAAAKQBAAMAAAABAAEAAKQCAAMAAAABAAAAAKQDAAMAAAABAAEAAAAA
    AAAyMDEyOjA4OjEyIDE0OjU3OjI1ADIwMTI6MDg6MTIgMTQ6NTc6MjUAAAAMAAAABAAAAgABAAIA
    AAAEUjk4AAACAAcAAAAEMDEwMAAAAAAAAAAAUHJpbnRJTQAwMzA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Ok6eEkDk9BVXTbQNGuDyDWo8nkRba2pUbxvMxquP
    Ly2KeuSrgqOoqrpSmVSah1GbzpDjPWrVo4t7Pd6CrdJuJlCCg0UtaultYmDcEVxepkSuWxkGtbxX
    qX2mbaD096xWQFQcipkr7GzjdNSIjH5oHJAHt1pFgXf/AFNSiMLEcdetMjYouM8miEHF6HLJJpLY
    bLhOhxnvRDaoVJGeaiklJPpinpMIIx3xWsoy0VzOnGCmAgRHYcHjNWra2MpA7VT2GeTeFxitrw/Z
    GYgH8aHDoHKnLa5t6PYqI0J5A/KofEd0udqdBWxGEtbQj+L6Vx3ii9MDMQe/rTS5LWY5wlpZGTq8
    ytMSRjiodPhDtuHaq8lz9qJx1NX7W3WCHryazSlN6nTOMIU7ou2x/dk9cdqcg8wgelRo3lxD1NTx
    ncoA496rks7nIrShykkbEIV6k1B5SwvuPrUvO3AbJqrdXW2M57VsptbkypR08jK8TSi7iYEfNyAa
    5m2VpmKjr/KtjU7oMWO6qPh2Atcu7D5TwD71pH4TjnBOtfqUrmI22QRiremSB0HoO1WNXtlaI560
    3R1W3iIKne3qKh8rTTNo03TmmWZJDhQh5zznrj296bfBvIBzz+vFTRhXc7sgiq08zSTf7PaiKSXK
    TNc03UI4ZCeH6euKZdQmQZGCP1qwsJU5J+lMRBJLjPGax5eV3Om/PHlJbOEtBgdcVz+sWpiZkPQn
    v1rtdIt0kXAUYNc345sTb3vHQjAryMfdvmPqMlXLF0znXkSMAFscVGtgHkLZytMumMgCYwT/ADpE
    le3bGBkVxRi7N7Ho+xTldks0ghTABAzj8KtaTcpHqELZ6GqkhLW+WGDmoomEUwcHoeKzhK+jZUaf
    K20j3DStSik0+Pa3y4zTn1BQCQeK8+8M+NI5LZYhJ8yDGKu3nisRAruwT3FdEKi2PPrUG/iOvl1t
    HBG8cfzrNudZTee5zXHz+K2Y4BqOfxCZEznmm5S2GqCdtLs7NvFChQARx71XuNc3tuGAa4OfVpGc
    MCetLda5PsABYgelZQhyat3K9jzy1Wx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
    YnHSuNyqdDtVGErx" alt="Big Smile" />

    This method is mostly supported by most of the common email clients, including Outlook.

    Hope this better explains an alternate solution,

    Friday, September 21, 2012 12:37 PM
  • Have tried several ways around the img src tag, and does not work at all.
    Unfortunately, the "src=...." portion is removed from the email.

    Wednesday, March 19, 2014 1:48 PM
  • Unfortunately, inline base64 encoding of image data is not well supported by most email clients.. such as Outlook. It seems that Outlook 2003 did support it but this functionality has been removed from later versions of Outlook.

    http://www.campaignmonitor.com/blog/post/3927/embedded-images-in-html-email

    Your only real option is to host the image from an Internet accessible URL.

    Thursday, March 20, 2014 1:58 AM