Using the CFMAIL Tag to Send Image Email

My code is as follows:

<cfmail
    to="sender@xyz.com"
    from="receiver@xyz.com"
    subject="email with image">

    <img src="cid:pClip" width="350" height="85" alt="" />

    there is an image above this msg.

    <cfmailparam file="#ExpandPath('PaperClip.jpg')#"
        contentid="pClip"
        disposition="inline" />

  </cfmail>

I got this to work, however now the problem is that the image is displayed as an attachment, the inline string is NOT (email client: Outlook 2010). Any suggestions?

+3
source share
1 answer

you need to add type attribute in your cfmail tag

<cfmail
    to="sender@xyz.com"
    from="receiver@xyz.com"
    subject="email with image"
    type="html">
+6
source

All Articles