CFMAILPARAM

CFMAILPARAM can either attach a file or add a header to a message. If you use CFMAILPARAM, it is nested within a CFMAIL tag. You can use more than one CFMAILPARAM tags within a CFMAIL tag in order to attach one or more files and headers.

See also CFMAIL.

Syntax

<CFMAIL 
    TO="recipient"
    SUBJECT="msg_subject"
    FROM="sender"
    ...more attibutes...
>
    <CFMAILPARAM 
        FILE="file-name"
    >
    or
    <CFMAILPARAM 
        NAME="header-name"
         VALUE="header-value"
    >
    ...
</CFMAIL>

FILE

Required if you do not specify the NAME attribute. Attaches the specified file to the message. This attribute is mutually exclusive with the NAME attribute.

NAME

Required if you do not specify the FILE attribute. Specifies the name of the header. Header names are case insensitive. This attribute is mutually exclusive with the FILE attribute.

VALUE

Optional. Indicates the value of the header.

Example

<!--- This example shows the use of CFMAILPARAM --->
<HTML>
<HEAD>
<TITLE>CFMAILPARAM Example</TITLE>
</HEAD>

<BODY>
<H3>CFMMAILPARAM Example</H3>

<P>
This example uses CFMAILPARAM to attach two files and add a header to a 
message.
</P>
<CFMAIL FROM="peter@domain.com" To="paul@domain.com" Subject="See 
Important Attachments and Reply">
    <CFMAILPARAM NAME="Reply-To" VALUE="mary@domain.com">
    Please read the text file and view the new logo, and let us know what 
    you think.
    <CFMAILPARAM FILE="c:\work\readme.txt">
    <CFMAILPARAM FILE="c:\work\logo.gif">
</CFMAIL>
</BODY>
</HTML>