?
Solved

Cold Fusion code question

Posted on 2014-11-06
4
Medium Priority
?
89 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
 
LVL 1

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
 
LVL 1

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 2000 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

The Ideal Solution for Multi-Display Applications

Check out ATEN’s VS1912 12-Port DP Video Wall Media Player at InfoComm 2017. Kerri describes how easy it is to design creative video walls in asymmetric layouts and schedule detailed playlists ahead of time with its advanced scheduling feature.

Question has a verified solution.

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

Hi, I will be creating today a basic tutorial on how we can create a Mail Custom Function and use it where ever we want. The main advantage about creating a custom function is that we can accommodate a range of arguments to pass to the Function and …
Recently while working on a project I got a very annoying cfdocument has no body error message. I had never seen this error before. So I checked the code. The code was pretty simple; it was Just showing me the cfdocumnt tag and inside that tag a …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Suggested Courses

765 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