ColdFusion 9.0 Resources |
cfmailpartDescriptionSpecifies one part of a multipart e-mail message. Can only be used in the cfmail tag. You can use more than one cfmailpart tag within a cfmail tag. Syntax<cfmail ... > (Optional cfmailparam entries) <cfmailpart charset="character encoding" type="mime type" wraptext="number" > Mail part contents </cfmailpart> ... </cfmail> Note: You can specify
this tag’s attributes in an attributeCollection attribute
whose value is a structure. Specify the structure name in the attributeCollection attribute
and use the tag’s attribute names as structure keys.
See alsocfmail, cfmailparam, cfpop, cfftp, cfhttp, cfldap, cfcontent, Wrap; E-mail in the Developing ColdFusion Applications Attributes
UsageUse this tag to create mail messages with alternative versions of the message that duplicate the content in multiple formats. The most common use is to send a plain text version of the message that can be read by all mail readers followed by a version formatted in HTML for display by HTML-compatible mail readers. Specify the simplest version first, with more complex versions afterwards. For more information, see www.ietf.org/rfc/rfc2046.txt. Example<h3>cfmailpart Example</h3> <cfmail from = "peter@domain.com" To = "paul@domain.com" Subject = "Which version do you see?"> <cfmailpart type="text" wraptext="74"> You are reading this message as plain text, because your mail reader does not handle HTML text. </cfmailpart> <cfmailpart type="html"> <h3>HTML Mail Message</h3> <p>You are reading this message as <strong>HTML</strong>.</p> <p>Your mail reader handles HTML text.</p> </cfmailpart> </cfmail> |