Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

CFMAIL Error Message Truncated

Posted on 2009-05-08
2
Medium Priority
?
217 Views
Last Modified: 2013-12-24
I have an error message handler which e-mail's me of errors on the site.  However, I have noticed on the REQUEST errors, some error messages will include a quotation mark in the error message, which leads the CFMAIL tag to assume the quotation mark is actually closing the CFMAIL tag.  How can I 'encapsulate' the error message so the CFMAIL tag does not thing the quotation mark in the error message is the closing quotation mark for the CFMAIL tag.

In the following code, after the referring page line, a quotation mark in the actual error text appears, which is why there is no explanation of what the error is.
Error Template: /portal/portal/directory/processuser.cfm 
Date Time:Mon Apr 13 09:56:36 GMT-07:00 2009 
Users Browser: Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; InfoPath.1; .NET CLR 3.0.04506.648)
Query String: 
Referring Page: https://members.visualeffectssociety.com/portal/portal/directory/user.cfm

Open in new window

0
Comment
Question by:perdiemconsulting
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 19

Expert Comment

by:erikTsomik
ID: 24338956
can you post some code
0
 
LVL 1

Accepted Solution

by:
zacspam earned 500 total points
ID: 24339213
Without really seeing any code, I'd suggest looking into the DE() function.  You can send your cferror.whatever within a DE() function.

Alternatively, I think you can add a mailto="" attribute to the <cferror> tag, but it has been a while since I tried that.

Hope that helps!


From the Adobe website:

DE()
Escapes any double-quotation marks in the parameter and wraps the result in double-quotation marks.
Postpones evaluation of a string that is passed as a parameter to the IIf or Evaluate functions.

The following example shows how you can use the DE function and number signs together, and shows how the function works with an IIF function:

<cfoutput>
<cfset var1=Blue>
<cfset var2=Green>
<cfset myresult=IIf( 1 eq 2, DE(#Var1#), DE(#Var2#))>
The expression is #myresult#
</cfoutput>

ColdFusion processes this code as follows:

   1. ColdFusion sets the variables var1 and var2 to be the strings Blue and Green.
   2. In the fourth line, ColdFusion evaluates the variables surrounded by number signs first, replacing them with the strings Blue and Green, the values of the variables.
   3. The IIF function evaluates the test expression, determines that it is False, and then evaluates the third parameter.
   4. The third parameter is a DE function, which takes the string Green and surrounds it in quotation marks
   5. The IIF function returns the string "Green", including the quotation marks.
   6. The cfset tag gets the expression result="Green", and sets the value of the myresult variable to the string Green.
   7. ColdFusion evaluates #myresult# in the output text, replaces the variable with its value, the string Green, and displays the result.


http://livedocs.adobe.com/coldfusion/7/htmldocs/wwhelp/wwhimpl/common/html/wwhelp.htm?context=ColdFusion_Documentation&file=00000458.htm
0

Featured Post

Simplify Your Workload with One Tool

How do you combat today’s intelligent hacker while managing multiple domains and platforms? By simplifying your workload with one tool. With Lunarpages hosting through Plesk Onyx, you can:

Automate SSL generation and installation with two clicks
Experience total server control

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…

670 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question