Solved

to send e-mail on click

Posted on 2004-10-28
129 Views
Last Modified: 2013-12-24
Hi,
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
0
Question by:MMsabry
    4 Comments
     
    LVL 5

    Expert Comment

    by:kkhipple
    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
     BCC="some_user@domain.com"
     FROM="user@domain.com"
     SUBJECT="subject title ">

    CONTENT
     </CFMAIL>

    </CFIF>


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

    Expert Comment

    by:mrichmon
    How about don't send the email until they reach the confirmation page.
    0
     

    Author Comment

    by:MMsabry
    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
    thanks
    0
     
    LVL 35

    Accepted Solution

    by:
    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.
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone. Privacy Policy Terms of Use

    Featured Post

    IT Security CISA, CISSP & CISM Certification

    Master the advanced techniques required to protect network resources from external threats with the IT Cyber Security bundle. Built around industry best-practice guidelines, the IT Cyber Security bundle consists of three in-depth courses.

    Have you ever sent email via ColdFusion and thought of tracking this mail to capture the exact date and time when the message was opened ?  If yes, then this article is for you ! First we need a table user_email with columns user_id , email , sub…
    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 Experts Exchange video Micro Tutorial, I'm going to show how small business owners who use Google Apps can save money by setting up what is called a catch-all email address in their Gmail accounts. By using the catch-all feature, small busin…
    Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

    860 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

    Need Help in Real-Time?

    Connect with top rated Experts

    14 Experts available now in Live!

    Get 1:1 Help Now