cfmailparam

Description

Can either attach a file or add a header to a message. It is nested within a cfmail tag. You can use more than one cfmailparam tag within a cfmail tag.

Category

Internet Protocol tags

Syntax


<cfmail 

  to = "recipient"

  subject = "msg_subject"

  from = "sender"

  ...more attibutes... >

  <cfmailparam 

    file = "file-name" >

  or

  <cfmailparam 

    name = "header-name"

     value = "header-value" >

  ...

</cfmail> 

See also

cfftp, cfhttp, cfldap, cfmail, cfpop

Attributes

Attribute
Description
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>cfmailparam 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>    



Banner.Novgorod.Ru