Solved

Cold Fusion code question

Posted on 2014-11-06
4
86 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
  • 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

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PHP in Apache server 20 93
htaccess restrict subdomain 4 112
Coldfusion RegEx 8 62
popup load of page and setting up of session 8 37
One of the typical problems I have experienced is when you have to move a web server from one hosting site to another. You normally prepare all on the new host, transfer the site, change DNS and cross your fingers hoping all will be ok on new server…
Meet the world's only “Transparent Cloud™” from Superb Internet Corporation. Now, you can experience firsthand a cloud platform that consistently outperforms Amazon Web Services (AWS), IBM’s Softlayer, and Microsoft’s Azure when it comes to CPU and …
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 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