Skip navigation
wycks
Currently Being Moderated

application.cfc and email notification

Jun 10, 2012 10:04 AM

I posted this a couple weeks ago in the general coldfusion forum but got no replies.  If what I'm asking is impossible, I'd appreciate it if you'd just let me know--or if there's a different way to do what I want that I'm unaware of.  Thanks.

------------------------------------------------------------------

I'm in the process of finishing a website and it is heavily dependent on user interaction.  It has lots of different forms and message board and, when I launch it, I'd really like to be notifvied by email whenever someone posts anything on any page of the site, so I can respond in the early going before many people have started to use the site.

 

Currently, I have email notification set up for private messages sent from user to user, so I know how to do that.  But it would be a real pain to have to go through every page on the site that has a form and insert the code that notifies me whenever something is posted.  I only need to do this with me--I just want to know whenever someone posts, nobody else but me has to know whenever someone posts anything on the site.


So my question is, is there some way I can insert some code into application.cfc to notify me whenever anyone posts anything so I don't have to go through every single page and insert the code myself

 

Or maybe there is a way to do it that doesn't involve application.cfc, I don't know.  Anything that does what I'm asking will be greatly appreciated.

 
Replies
  • Currently Being Moderated
    Jun 10, 2012 4:12 PM   in reply to wycks

    You can do lot's of things in Application.cfc.  If posting is done by form, in your onRequestStart method, you can do something like:

     

    if (structkeyexists(form,"fieldnames") is true)

    send mail to yourself.

     
    |
    Mark as:
  • Currently Being Moderated
    Jun 10, 2012 7:00 PM   in reply to wycks

    Submit a form to a page with only this code:

     

    <cfdump var-"#form#">

     

    Then you'll know whether or not my answer was correct. 

     
    |
    Mark as:

More Like This

  • Retrieving data ...

Bookmarked By (0)

Answers + Points = Status

  • 10 points awarded for Correct Answers
  • 5 points awarded for Helpful Answers
  • 10,000+ points
  • 1,001-10,000 points
  • 501-1,000 points
  • 5-500 points