You need to fully scope your variables, just using email is really not a good idea.
Regards, Andrew Scott http://www.andyscott.id.au/ > -----Original Message----- > From: John Barrett [mailto:[email protected]] > Sent: Wednesday, 22 September 2010 4:54 PM > To: cf-newbie > Subject: email+Application.cfc > > > Hi, is it possible to set a variable in the Application.cfc file to use as a email > setting? > > my example of this part of the Application.cfc > <!--- Application.cfc---> > <cfcomponent displayname="testEmail" output="false"> > > <cfset this.name = "testEmail" /> > <cfset this.email = "my email address"> > <cfset this.smtpserversettings = { > server="my mail server", > username="user name", > password="password" > } /> > </cfcomponent> > > <!--- mailtest.cfm---> > <cfmail > from="#email#" > to="[email protected]" > subject="CF 9 Email Test" > type="HTML"> > > <p> > message > </p> > > </cfmail> > > the part I am stuck on is setting the email address is the Application.cfc as a > variable to use for all the email forms, such as I would set the dsn once in the > Application.cfc and use for all pages connecting. > > thanks so much, > Johnny > > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > ~~~~~~~~~~~| > Order the Adobe Coldfusion Anthology now! > http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael- > Dinowitz/dp/1430272155/?tag=houseoffusion > Archive: http://www.houseoffusion.com/groups/cf- > newbie/message.cfm/messageid:5107 > Subscription: http://www.houseoffusion.com/groups/cf- > newbie/subscribe.cfm > Unsubscribe: http://www.houseoffusion.com/groups/cf- > newbie/unsubscribe.cfm ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| Order the Adobe Coldfusion Anthology now! http://www.amazon.com/Adobe-Coldfusion-Anthology-Michael-Dinowitz/dp/1430272155/?tag=houseoffusion Archive: http://www.houseoffusion.com/groups/cf-newbie/message.cfm/messageid:5108 Subscription: http://www.houseoffusion.com/groups/cf-newbie/subscribe.cfm Unsubscribe: http://www.houseoffusion.com/groups/cf-newbie/unsubscribe.cfm
