Solved

Cold Fusion code question

Posted on 2014-11-06
4
87 Views
Last Modified: 2014-12-18
Hi,
I am looking at some cold fusion code that I didn't write and trying to figure out something.
Here is the code:

<cfcomponent displayname="Email" output="false">
      <cffunction name="getEnvProperAddress" access="public" output="false">
            <cfargument name="emailAddress" required="true" />
            <cfif application.environment neq "pro" and application.environment neq "beta">
                  <cfreturn application.email />
            <cfelse>
                  <cfreturn arguments.emailAddress />
            </cfif>
      </cffunction>
</cfcomponent>



I am particularly interested in this line:  <cfreturn application.email />

I need to figure out where the email address that is being returned is coming from.

This CF code runs on a web server that has SQL server as it's back end. There are many stored procs in SQL server but it doesn't look like a stored proc is being used here.

There is a file at the root level of the web server called Application.cfc but I don't see any reference in that file to email addresses.

Thanks for the help!
Nacht
0
Comment
Question by:nachtmsk
[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
  • 2
4 Comments
 

Author Comment

by:nachtmsk
ID: 40426079
FYI -- the above code is being called on the web page like this:

<cfset emailto="#(email.getEnvProperAddress(theEmail))#">


Also wondering what "theEmail" is referring to. Appears to be an object, but where is it coming from?
0
 

Author Comment

by:nachtmsk
ID: 40426110
Never mind, I figured out that 'theEmail' was a set variable.
0
 
LVL 25

Accepted Solution

by:
dgrafx earned 500 total points
ID: 40427706
search your entire code base for Application.environment and also search for Application.email
that should give a clue as to where they are being set
chances are the values are in a db table and when the Application starts the table is queried and the Application vars are set.

if you can't find Application.environment or Application.email then search for just environment and email
hopefully there aren't too many results
the syntax of setting them may be a bit different than cfset Application.environment for ex

post back with any questions ...
0
 
LVL 25

Expert Comment

by:dgrafx
ID: 40507479
well - thanks for the points!

good luck ...
0

Featured Post

Create the perfect environment for any meeting

You might have a modern environment with all sorts of high-tech equipment, but what makes it worthwhile is how you seamlessly bring together the presentation with audio, video and lighting. The ATEN Control System provides integrated control and system automation.

Question has a verified solution.

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

If you don't have the right permissions set for your WordPress location in IIS, you won't be able to perform automatic updates. Here's how to fix the problem.
Lease-to-own eliminates the expenditure of hardware replacement and allows you to pay off the server over time. Usually, this is much cheaper than leasing servers. Think of lease-to-own as credit without interest.
In a recent question (https://www.experts-exchange.com/questions/29004105/Run-AutoHotkey-script-directly-from-Notepad.html) here at Experts Exchange, a member asked how to run an AutoHotkey script (.AHK) directly from Notepad++ (aka NPP). This video…

730 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