Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


to send e-mail on click

Posted on 2004-10-28
Medium Priority
Last Modified: 2013-12-24
I have a page in my application, when the user press 'pay' they ge sent to the online credit card processor.
I also wish to make an automatic e-mail be sent to them when they press pay.
the way I have it setup right now is using cfinclude, but that means that the moment they reach this page
they automatically get the e-mail although they might decied to go back and change something
how can I set this up
I imagine it would be though JS!but I don't know
thanks for the help
Question by:MMsabry
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

Expert Comment

ID: 12433855
so if pay is a link  ...  <A HREF="somepage.cfm?email=yes">pay</A>

you should notice how the query string contains the email = yes

now in your page... you use the following code

<CFIF IsDefined("URL.email") AND URL.email EQ "yes">

<CFMAIL TO="everyone@domain.com
 SUBJECT="subject title ">



<CFMAIL> http://livedocs.macromedia.com/coldfusion/6.1/htmldocs/tags-pta.htm
LVL 35

Expert Comment

ID: 12434850
How about don't send the email until they reach the confirmation page.

Author Comment

ID: 12435028
you see the page they go to after they press "pay" (which is a button) is not on my server, it is on the cc processor server.
The reason for sending this e-mail now (which I did not do before) is that orginally the system was designed to send the e-mail after they go to the processor and come back to my site, then I show the confirmation page with the payment status. But that for some reason did not work always, as I have noticed some users did not get redirected back to my page, although the information is already in the db, I did not get any notices that there have been some activity on my site. Thus I switched to this one, where they get one before they leave my site and one after
LVL 35

Accepted Solution

mrichmon earned 2000 total points
ID: 12435173
Well javascript cannot send the email message.

So how about this

Have the page submit to another one of your pages when they hit pay.  You send the email and then redirect /resubmit to where they are going to pay.  You can have the email say something like : THis is a preliminary confirmation.

Or will the CC server send them back to your site when paying is done? It sounds like it.   If so then send the email at that point with the confirmation page.

Or have a trigger/task (depending on database) that checks for new orders and sends you a message or them a message at the correct time.

Featured Post

Looking for a new Web Host?

Lunarpages' assortment of hosting products and solutions ensure a perfect fit for anyone looking to get their vision or products to market. Our award winning customer support and 30-day money back guarantee show the pride we take in being the industry's premier MSP.

Question has a verified solution.

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

Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
In this video, Percona Director of Solution Engineering Jon Tobin discusses the function and features of Percona Server for MongoDB. How Percona can help Percona can help you determine if Percona Server for MongoDB is the right solution for …
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

636 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