<html>
<head>
<link href="mmres://user_interface_reference.css" rel="stylesheet" type="text/css">
<title>CFMAILPARAM</title>
</head>
<body bgcolor="#FFFFFF" text="#000000">
   <div id="Description">
   <table cellpadding="0" cellspacing="0" border="0" width="100%" class="main">
      <tr> 
         <td valign="top" class="name">CFMAILPARAM</td>
         <td valign="top" nowrap class="compatibility">&nbsp;</td>
      </tr>
      <tr>
         <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
      </tr>


    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Description</span>
<p>
Attaches a file or adds a header to an e-mail message. 
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Category</span>
<p>
Internet Protocol tags
</p>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="syntax"><span class="title">Syntax</span><pre>&lt;cfmail 
   to = &quot;recipient&quot;
   subject = &quot;msg_subject&quot;
   from = &quot;sender&quot;
   ...more attributes... &gt;

   &lt;cfmailparam 
      file = &quot;file-name&quot; 
      type =&quot;media type&quot;
      contentID = &quot;content ID&quot;
      disposition = &quot;disposition type&quot;&gt;
   or
   &lt;cfmailparam 
      name = &quot;header-name&quot;
       value = &quot;header-value&quot; &gt;
   ...
&lt;/cfmail&gt;
</pre>    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">See also</span>
<p>
cfmail, cfmailpart, cfftp, cfhttp, cfldap, cfpop; "Using the cfmailparam tag" in Chapter&#160;39, "Sending and Receiving E-Mail," in ColdFusion MX Developer's Guide
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">History</span>
<p>
ColdFusion MX 6.x: Added the Disposition and ContentID attributes.
</p>

<p>
ColdFusion MX&#160;6.1: Added the type attribute.
</p>

<p>

</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Usage</span>
<p>
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. 
</p>

<p>
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.
</p>

<p>
To display a file inline in a mail message:
</p>
<ol type="1">

<li>Specify type=&quot;html&quot; in the cfmail tag. </li>

<li>Specify disposition=&quot;inline&quot; and a ContentID attribute in the cfmailparam tag. </li>

<li>Use a src=&quot;cid:ContentIDValue&quot; attribute to identify the content to include in the HTML tag such as the img tag. </li>
</ol>

<p>
The second example shows this use.
</p>
    </td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="CLEARSEPARATION">&nbsp;</td>
  </tr>
  <tr>
    <td valign="top" colspan="2" class="description"><span class="title">Example</span><pre>&lt;h3&gt;cfmailparam Examples&lt;/h3&gt;
&lt;p&gt;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.&lt;/p&gt;
&lt;cfmail from = &quot;peter@domain.com&quot; To = &quot;paul@domain.com&quot; 
Subject = &quot;See Important Attachments and Reply&quot;&gt;
   &lt;cfmailparam name = &quot;Importance&quot; value = &quot;High&quot;&gt;
   Please review the new logo. Tell us what you think.
   &lt;cfmailparam file = &quot;c:\work\readme.txt&quot; type=&quot;text/plain&quot;&gt;
   &lt;cfmailparam file = &quot;c:\work\logo.gif&quot; type=&quot;image/gif&quot;&gt;
   &lt;cfmailparam name=&quot;Disposition-Notification-To&quot; value=&quot;peter@domain.com&quot;&gt;
&lt;/cfmail&gt;
&lt;p&gt;This view-only example displays an image in the body of
   an HTML message.&lt;/p&gt;
&lt;cfmail type=&quot;HTML&quot;
      to = &quot;#form.mailto#&quot;
      from = &quot;#form.mailFrom#&quot;
      subject = &quot;Sample inline image&quot;&gt;
   &lt;cfmailparam file=&quot;C:\Inetpub\wwwroot\web.gif&quot; 
      disposition=&quot;inline&quot; 
      contentID=&quot;image1&quot;&gt;
   &lt;P&gt;There should be an image here&lt;/p&gt;
   &lt;img src=&quot;cid:image1&quot;&gt;
   &lt;p&gt; After the picture&lt;/p&gt;
&lt;/cfmail&gt;
</pre>
         </td>
      </tr>
   </table>
   </div>
<div id="FILE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">FILE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Required if you do not specify name attribute</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>Attaches a file in a message. Mutually exclusive with name attribute. The file is MIME encoded before sending.</p>

  </td>
  </tr>
  </table>
</div>
<div id="NAME">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">NAME</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Required if you do not specify file attribute</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>Name of header. Case-insensitive. Mutually exclusive with file attribute.</p>

  </td>
  </tr>
  </table>
</div>
<div id="TYPE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">TYPE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>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:</p><ul>

<li>text: specifies text/plain type.</li>

<li>plain: specifies text/plain type.</li>

<li>html: specifies text/html type.</li>
</ul>
<table>
  <tr valign="top">
    <td width="30"><strong>Note:	</strong></td>
    <td>For a list of all registered MIME media types, see www.iana.org/assignments/media-types/</a>.</td>
  </tr>
</table>

  </td>
  </tr>
  </table>
</div>
<div id="VALUE">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">VALUE</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>Value of the header. Not used with the file attribute.</p>

  </td>
  </tr>
  </table>
</div>
<div id="CONTENTID">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">CONTENTID</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">



<p>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. </p>

  </td>
  </tr>
  </table>
</div>
<div id="DISPOSITION">
<table border="0" cellspacing="0" cellpadding="0" width="100%">
<tr>  
<td valign="top" class="name">DISPOSITION</td>
  <td valign="top" nowrap class="compatibility">&nbsp;</td>
  </tr>
  <tr>
  <td colspan="2" class="divider"><img src="dwres:18084" width="100%" height="1"></td>
  </tr>

  <tr>
  <td valign="top" class="syntax">&nbsp;</td>
  <td valign="top" nowrap class="requirements">Optional</td>
  </tr>
  <tr>
  <td colspan="2" class="clearseparation">&nbsp;</td>
  </tr>
  <tr>
  <td valign="top" colspan="2" class="description">

<strong>Default value:</strong> "attachment"


<p>How the attached file is to be handled. Can be one of the following:</p><ul>

<li>attachment: presents the file as an attachment.</li>

<li>inline: displays the file contents in the message.</li>
</ul>


  </td>
  </tr>
  </table>
</div>

  </body>
</html>
