Quantcast
Channel: Adobe Community : Unanswered Discussions - ColdFusion
Viewing all articles
Browse latest Browse all 5794

Using and accessing session variable

$
0
0

I have found this page, Adobe ColdFusion 9 * Configuring and using session variables, but I do not know if the way I'm using is correct. In the contact us page, I set the session variable to 1 (for yes the user has turned off java script). In the submission-success.cfm, I tried this:

<cfif #session.EmailSuccess# eq 1>

  <cfif (form.mailto is not "" AND form.mailfrom is not "" AND form.message is not "" AND form.name is not "")>

  <cfset session.myweb.email.success = "true">

  <cfmail to = "#form.mailto#" from = "#form.mailfrom#" subject = "Inquiry from Contact Us Form by #form.name#" server="smtp.myweb.com" port="25" type="html">

  <cfoutput>

  <p>This message was sent by an automatic mailer by #form.name#:</p>

  <p>= = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = =<p>

  <p>#form.message#</p>

  <p><cfif structkeyexists(form, "phone")>Phone: #form.phone#</cfif></p>

  </cfoutput>

  </cfmail>

  <cfelse>

  <cfset session.uwec.email.success="false"> 

  <cfset session.uwec.email.failmsg="Please Submit with reCaptcha">

  </cfif>

</cfif>

 

The email was never sent. Any suggestion is much appreciated.


Viewing all articles
Browse latest Browse all 5794

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>