Adobe COLDFUSION 9 Manual page 1205

Developing applications
Hide thumbs Also See for COLDFUSION 9:
Table of Contents

Advertisement

DEVELOPING COLDFUSION 9 APPLICATIONS
Using External Resources
<cfmail from="daniel@MyCompany.com"
to="jacob@YourCompany.com"
subject="Requested Files">
Jake,
Here are the files you requested.
Regards,
Dan
<cfmailparam file="c:\widget_launch\photo_01.jpg">
<cfmailparam file="c:\widget_launch\press_release.doc">
</cfmail>
Use a fully qualified system path for the
ColdFusion server machine (or a location on the local network), not the browser machine.
Including images in a message
You can use the
cfmailparam
1
Place a
tag for each image following the
cfmailparam
In each
tag, do the following
2
cfmailparam
• Set the
attribute to the location of the image.
file
• Specify
disposition="inline"
• Set the
attribute to a unique identifier; for example, myImage1.
contentID
In the location in your HTML where you want the message included, use an
3
<img src="cid:myImage1">
The following example shows a simple mail message with an inline image. In this case, the image is located between
paragraphs, but you could include it directly inline with the text. To test this example, replace the
with a valid e-mail address and change the
<cfmail type="HTML"
to = "Peter@myCo.com"
from = "Paul@AnotherCo.com"
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> This text follows the picture</p>
</cfmail>
Adding a custom header to a message
When the recipient of an e-mail message replies to the message, the reply is sent, by default, to the address specified in
the From field of the original message. You can use the cfmailparam tag to provide a Reply-To e-mail address that tells
the mail client to override the value in the From field. Using
addressed to widget_master@YourCompany.com:
attribute of
file
cfmailparam
to include images from other files in an HTML message, as follows:
cfmail
parameter to the path to a valid image.
file
Last updated 8/5/2010
. The file must be located on a drive on the
start tag.
tag such as the following:
img
, the reply to the following example is
cfmailparam
1200
parameter
cfmailto

Advertisement

Table of Contents
loading

Table of Contents