SendMail EmbeddedResources Example

This example shows you how to embed two images in an email and how to reference them from within your email. Note that this feature is new in 1.3 build 3.

Smartsite SXML CopyCode image Copy Code
<se:sendmail
    from="john@holidayineurope.com"
    to="katy@holidayineurope.com"
    subject="Holiday pictures"
>    
    <se:parameters>
        <se:parameter name="htmlbody">
            <html>
                <head><title></title></head>
                <body>
                    <p>Hi Katy, here are my holiday pictures.</p>
                    <p>
                        <img src="cid:oldcar" alt="An old car" />
                        <br />
                        <img src="cid:montblanc" alt="The Mont Blanc" />
                    </p>
                </body>
            </html>
        </se:parameter>
        <se:parameter name="embeddedresources">
            <se:collection>
                <se:member name="oldcar" mimetype="image/jpeg" value="{itemdata.field(BinaryData, 6736)}" />
                <se:member name="montblanc" mimetype="image/jpeg" value="{itemdata.field(BinaryData, 6735)}" />
            </se:collection>
        </se:parameter>
    </se:parameters>
</se:sendmail>