使用CFMAIL标签发送带有图像的电子邮件

时间:2011-06-13 20:34:55

标签: coldfusion coldfusion-8 cfmail

我的代码如下,

<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>

我让这个工作,但现在问题是图像显示为附件,内联(邮件客户端:Outlook 2010)。有什么建议吗?

1 个答案:

答案 0 :(得分:6)

您需要为cfmail标记添加type属性

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