cfmailparam
301
Usage
This tag attaches a file or adds a header to an e-mail message. It can only be used in the
cfmail
tag. You can use multiple
cfmailparam
tags within a
cfmail
tag.
You can use this tag to include a file, such as an image, in an HTML mail message. The file can be
displayed inline in an HTML message, or as an attachment. To include multiple files, use
multiple
cfmailparam
tags.
To display a file inline in a mail message:
1.
Specify
type="html"
in the
cfmail
tag.
2.
Specify
disposition="inline"
and a
ContentID
attribute in the
cfmailparam
tag.
3.
Use a
src="cid:
ContentIDValue
" attribute to identify the content to include in the HTML tag
such as the
img
tag.
The second example shows this use.
Examples
<h3>cfmailparam Examples</h3>
<p>This view-only example uses cfmailparam to 1) add header to a message and 2)
attach files and 3) to return a receipt to the sender.</p>
<cfmail from = "[email protected]" To = "[email protected]"
Subject = "See Important Attachments and Reply">
<cfmailparam name = "Importance" value = "High">
Please review the new logo. Tell us what you think.
<cfmailparam file = "c:\work\readme.txt" type="text/plain">
<cfmailparam file = "c:\work\logo.gif" type="image/gif">
<cfmailparam name="Disposition-Notification-To" value="[email protected]">
type
Optional
The MIME media type of the file. Not used with the
name
attribute. Can be a valid MIME media type or
one of the following:
•
text: specifies text/plain type.
•
plain: specifies text/plain type.
•
html: specifies text/html type.
Note:
For a list of all registered MIME media
types, see
www.iana.org/assignments/media-
types/
.
value
Optional
Value of the header. Not used with the
file
attribute.
contentID
Optional
The
Identifier
for
the attached file. This ID should
be globally unique and is used to identify the file in
an IMG or other tag in the mail body that
references the file content.
disposition Optional
attachment How the attached file is to be handled. Can be one
of the following:
•
attachment: presents the file as an attachment.
•
inline: displays the file contents in the message.
Attribute
Req/Opt
Default
Description
Summary of Contents for COLFUSION MX 7-CFML
Page 1: ...COLDFUSION MX7 CFML Reference...
Page 20: ...20 Chapter 1 Reserved Words and Variables...
Page 50: ...50 Chapter 2 ColdFusion Tags cfelse br Searching cfif cfloop cfif...
Page 101: ...cfdefaultcase 101 cfdefaultcase cfswitch cfoutput Your grade is grade cfoutput...
Page 115: ...cfdocumentsection 115 cfdocumentsection cfoutput cfdocument...
Page 411: ...cftable 411 cftable body html...
Page 515: ...Chr 515 maxlength 5 p input type Submit name input type RESET cfform...
Page 605: ...GetEncoding 605 WriteOutput The encoding is theEncoding cfscript cfif...
Page 629: ...GetProfileString 629 tr td input type Submit name Submit value Submit td td td tr table form...
Page 655: ...IIf 655 cfoutput IIf Hour Now GTE 12 DE It is afternoon or evening DE It is morning cfoutput b...
Page 664: ...664 Chapter 3 ColdFusion Functions cfelse h3 Conversion error h3 cfif...
Page 687: ...IsStruct 687 cfoutput cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 751: ...LSDateFormat 751 hr noshade cfoutput cfloop...
Page 861: ...StructFind 861 cfquery cfif cfoutput hr Employee Add Complete cfoutput cfcase cfswitch...
Page 903: ...Val 903 value Is the beginning numeric name form...
Page 932: ...932 Chapter 3 ColdFusion Functions...
Page 944: ...944 Chapter 4 ColdFusion MX Flash Form Style Reference...
Page 962: ...962 Chapter 5 Application CFC Reference...
Page 1054: ...1054 Chapter 6 ColdFusion MX Event Gateway Reference...