Image 生成带有CFSaveContent、图像don'的html;t显示
我正在尝试使用Image 生成带有CFSaveContent、图像don'的html;t显示,image,coldfusion,cfmail,Image,Coldfusion,Cfmail,我正在尝试使用cfsavecontent发送一个html页面(带有CSS格式)。但是,当我通过cfmail发送变量时,除了图像之外,其他一切都很好 <cfsavecontent variable="YourImg"> <table class="table_css"> <tr> <td> <p> your image is this:</p>
cfsavecontent
发送一个html页面(带有CSS格式)。但是,当我通过cfmail
发送变量时,除了图像之外,其他一切都很好
<cfsavecontent variable="YourImg">
<table class="table_css">
<tr>
<td>
<p> your image is this:</p>
<img src="/imgs/image.jpg">
</td>
</tr>
</table>
</cfsavecontent>
<cfmail from="email@hotmail.com" to="email@gmail.com" subject="test email" type="html">
test:
<br /><br /><br />
#YourImg#
<br /><br /><br />
</cfmail>
你的形象是这样的:
测试:
#尤里姆#
这显示了用CSS格式化的HTML表,但图像似乎丢失了。有人能解释为什么吗?
只将标记之间生成的标记保存为字符串。您可以
自己查看
可以捕获图像,但可以将其保存到pdf文件中。Doc@
要将文件附加到电子邮件,请查看
@
示例2:此仅视图示例在视图主体中显示图像
HTML消息
<cfmail type="HTML"
to = "#form.mailto#"
from = "#form.mailFrom#"
subject = "Sample inline image">
<cfmailparam file="C:\Inetpub\wwwroot\web.gif"
disposition="inline"
contentID="image1">
<p>There should be an image here</p>
<img src="cid:image1">
<p>After the picture</p>
</cfmail>
这里应该有一张图片
在图片之后
当您想在HTML电子邮件中嵌入图像时,只需提供绝对URL即可。所以
src
属性看起来像http://somedomain.com/imgs/image/jpg
而不是/imgs/image.jpg