<CFMAILPARAM> Tag - ColdFusion
>> Return to ColdFusion Tag Index
The <CFMAILPARAM> tag allows you ...
<CFMAILPARAM> Comments from Macromedia LiveDocs
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
<!--- Script for multiple mail attachmanets --->
<!--- Formfield with the exact ( c:\.....) path to the attachments , delimited if more then one--->
<cfparam name="attach" default="">
<cfmail type="html" to="someone@xyz.com" from="me@xyz.com" subject="xy" >
<!--- loop through formfield and attach the files --->
<cfif #attach# is not "">
<cfset arr = listToArray(attach)>
<cfoutput>
<cfloop from="1" to="#arrayLen(arr)#" index="i">
<cfmailparam file="#arr[i]#">
</cfloop>
</cfoutput>
</cfif>
<!-- Mailtext starts here --->
<cfmail>
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
RE: Hutz said on Jun 17, 2004 at 6:10 PM :
This is still an outstanding issue. There is no way in CF 6.1 to generate a truly multi-part email that is standards compliant (containing both text and html versions of the email). The workaround described in "Macromedia issue 53723" generates a standards-breaking email, which displays incorrectly in most email clients.
It's little niggles like this that prevent CF from competing on a truly enterprise level. Text emails are back in the main stream now that people are receiving them on mobile devices such as blackberries, and all late model email applications block the loading of remote images; if you want the image to appear in the email (standards complaintly, I'm not talking about <cfmailparam file="image.gif"><img src='image.gif'>, which is not compliant and does not work in all email clients), you have to attach it in a multi-part/alternative email, giving it a CID, and referencing the CID in the src attribute.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
Could you discuss restrictions with the CFMAILPARAM tag in CFMX6.1?
For example:
-A custom MESSAGE-ID seems to be overwritten by the java system, even though it will appear correctly in the mail file in the spool directory.
-Your custom tags can be separated from the other headers by a one line space, causing some email pop readers (including CFPOP!) to believe that these extra parameters are in the body, not the header, if several CFMAILPARAMs are used in a row, with CFIFs around some of them.
Are there other limitations?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
ColdFusion 6.1 Updater
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Two attributes have been added to the cfmailparam tag to support
mail file attachments:
disposition="disposition-type"
content ID="content ID"
The disposition attribute specifies how the file content is to be
handled. Its value can be inline or attachment. The contentID attribute
specifies the mail content-ID header value and is used as an identifier
for the attached file in an IMG or other tag in the mail body that
references the file content. This ID should be globally unique.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
2.1.44 Disposition-Notification-To: header
Header name:
Disposition-Notification-To
Description:
Mailbox for sending disposition notification
Applicable protocol:
mail (http://www.rfc-editor.org/rfc/rfc2822.txt)
Status:
standards-track
Author/change controller:
IETF (mailto:iesg@ietf.org)
Internet Engineering Task Force.
Specification document(s):
http://www.rfc-editor.org/rfc/rfc2298.txt
Related information:
Indicates that the sender wants a disposition notification when this message is received (read, processed, etc.) by its recipients.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
Return Receipt Example
=================================================
<html>
<head>
<title>test cfmail - www.gruppotesi.com</title>
</head>
<body>
<h2>Send mail with Disposition-Notification-To -> return receipt</h2>
<cfmail from="reporter@mydomain.com"
to="developer@mydomain.com"
failto="postmaster@mydomain.com"
subject="Disposition-Notification-To">
<!---
header Disposition-Notification-To
--->
<cfmailparam name="Disposition-Notification-To" value="reporter@mydomain.com">
</cfmail>
</body>
</html>
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
Code from 4.5 and up doesn't work in 6.1. We had been building multipart emails using CFMAILPARAM NAME="Content-Type" VALUE="multipart/alternative; boundary=""------------61FAEAC2EB82FEB06690F767""" (or any other boundary)
This now causes a nullpointer error.
Technotes has a note on this citing "Macromedia issue 53723"
http://www.macromedia.com/support/coldfusion/ts/documents/type_cfmailparam.htm
Unfortunately, the posted workaround only works with Outlook and Outlook Express clients (as far as we can tell). Try Netscape, Mozilla, or Mac Mail and the formerly successful emails fail.
With the posted workaround, a second Content-Type header is generated after the one that CF generates automatically. Some clients read the first instance, some read the last. We need to be able to override the default. The inability of some java component to process text makes no sense.
We need a patch or a compliant workaround...
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
From what I've found out about file attachments on cfmail is that they have to be local.. as in c:\mail_attachment\whatever.ext
I'm using c:\mail_attachment\#variable#
the variable being the filename..
unfortunately I'm reading and writing the files to copy them..
and I'm having a binary file issue or whatever myself.. but I'll figure that out soon enough..
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
You might want to check to see if you put the cfoutput tag around your variable.. I forget to do this alot and check for it first thing if I have a variable problem..
<cfoutput>
#variable#
</cfoutput>
>I guess this is kind of similar to question by Didgiman...
>
>I have the following code:
><cfmailparam file="#fileName#">
>
>this gives me a Java.Lang.NullPointerException error. If I hardcode a >filename, it works fine. Does CF not like having variables in the >cfmailparam? Thanks.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
I guess this is kind of similar to question by Didgiman...
I have the following code:
<cfmailparam file="#fileName#">
this gives me a Java.Lang.NullPointerException error. If I hardcode a filename, it works fine. Does CF not like having variables in the cfmailparam? Thanks.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
Your documentations on CFMAILPARAM has a type - it says "HICH" instead of "HIGH"... here is the text from the documentation:
<cfmailparam name = "Importance" value = "Hich">
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
Your documentation on CFMAILPARAM has a typo - it says "HICH" instead of "HIGH"... here is the text from the documentation:
<cfmailparam name = "Importance" value = "Hich">
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
The example (/6.1/htmldocs/tags-pb2.htm) does not contain a 'return-receipt-requested' param - which is the subject matter being questioned above.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
We are working to improve the examples in the ColdFusion reference pages. We propose to replace the current example on this page with the the following example. If you have any comments on this example, add them to this page.
<h3>cfmailparam Example</h3>
<p>This view-only example uses cfmailparam to attach files and add header to
a message.</p>
<cfmail from = "peter@domain.com" To = "paul@domain.com" 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">
</cfmail>
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
Why is it then, that when I send a mail with Outlook, and I ask for a delivery receipt, I get the receipt, but when I send a mail to the same email address with ColdFusion, I get nothing?
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
ColdFusion sends the header.
The SMTP server that gets the message for delivery (not the one that CF is talking to) is responsible for sending the return receipt, but may not.
LiveDocs Comments - coldfusion - 6.1 - htmldocs - tags-pb2.htm
How on earth can I make this piece of code:
<cfmailparam name="Return-Receipt-To" value="#form.mailFrom#">
actually let the receiving server sent a receipt?
Yes, I am using it inside a cfmail tag that works.
Maybe I have to use another procedure? Please tell me!
[Top]
Recommended Books
COLDFUSION MX Web Application Construction Kit (5th Edition)
Authors: Ben Forta and Nate Weiss
1500 pages
[Top]
Web Sites
Macromedia
The makers of ColdFusion/ColdFusion MX.
ColdFusion Developer's Journal
Forta.com (ColdFusion Section)
Ben Forta is Macromedia's Senior Technical Evangelist. Here on his site find useful ColdFusion information.
Flash CFM
Flash and ColdFusion Development.
Handling file uploads without CFFILE
BLOG post by "Sam" on REWINDLIFE.COM gives insight into how to upload a file on your site if you are not allowed to use the CFFILE tag.
[Top]
Copyright © 2003- 2008, Orville Paul Chomer, All Rights Reserved
Home Page
Blog
How To
Chomer TV
The Show
Webcam Videos
Freeware
•
VB Mahjongg
Coding
•
ColdFusion
•
Javascript
•
Visual Basic
Other Places
Acoustic Eidolon
History Singers
Scobleizer
Beach Walks
Freshtopia
CSS Zen Garden