?
Solved

How do you send email out automatically

Posted on 2011-04-25
8
Medium Priority
?
271 Views
Last Modified: 2012-06-27
Expert:
I have a Cold Fusion web site with a back ended SQL database. I would like to know the best way and/or approach on how to send out a notification email out automatically if no action has not been received say with 8 hours. Action could be the database was updated. Curious hope this sort of thing is usally done?
0
Comment
Question by:tcmmaxt
8 Comments
 
LVL 9

Expert Comment

by:radcaesar
ID: 35462750
"if no action has not been received say with 8 hours" means no updates in database for 8 hours?
0
 
LVL 39

Accepted Solution

by:
gdemaria earned 1000 total points
ID: 35462939

As radcaesar alludes to, the first thing you need to do is identify what it means by "no action"

Do you have a time stamp for the last action so you know when 8 hours has past?

Then you need to setup a scheduled task and run a query to select the record you want to email where there has been no action for 8 hours.   Loop each item of the query and then log the fact that you sent out an email (that will prevent you from sending many of these emails).  You can log the email by updating a column on the table  (LastEmailDate) or adding a record to a child table (this will give you a history of all emails).

Of course you need to modify your query so that both conditions are checked - WHERE there has been no activity for 8 hours and No email has been sent out for X number of hours...

0
 
LVL 11

Assisted Solution

by:Brijesh Chauhan
Brijesh Chauhan earned 1000 total points
ID: 35464062
You could have a column in your database named lastUpdate of type datetime. This would store the latest date information of the last action that happened.

Then you will need a SCHEDULE task to be created in CF Administrator, which would run and check the lastUpdate with the present time (NOW()), and get the timedifference in Hours. If the timedifference is Greater or Equal to 8 hours, then it will trigger an EMAIL otherwise it will abort.
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 39

Expert Comment

by:gdemaria
ID: 35464291

i think there's an echo in here
0
 

Author Closing Comment

by:tcmmaxt
ID: 35466420
thank you very much. this will give me a good start
0
 
LVL 52

Expert Comment

by:_agx_
ID: 35467168
i think there's an echo in here

Haha. There's an echo riding around on your coat tails ;-)
0
 
LVL 39

Expert Comment

by:gdemaria
ID: 35467597

Lol, ya, just change the words around, throw in a google link sometimes ...
 
:)
0
 
LVL 52

Expert Comment

by:_agx_
ID: 35467749
Yes, throwing words around changes them! Especially with links.  Check this:

http://dictionary.reference.com/browse/echo
http://www.merriam-webster.com/dictionary/mimicry

;)

0

Featured Post

Veeam Disaster Recovery in Microsoft Azure

Veeam PN for Microsoft Azure is a FREE solution designed to simplify and automate the setup of a DR site in Microsoft Azure using lightweight software-defined networking. It reduces the complexity of VPN deployments and is designed for businesses of ALL sizes.

Question has a verified solution.

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

When it comes to write a Context Sensitive Help (an online help that is obtained from a specific point in state of software to provide help with that state) ,  first we need to make the file that contains all topics, which are given exclusive IDs. …
Strategic internal linking is often considered an SEO power technique, especially for content marketing. Do you need to hire an SEO agency to optimize you internal linking? No, this article will help you understand the basics of internal linking and…
The viewer will learn how to dynamically set the form action using jQuery.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
Suggested Courses

807 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