This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Other JSE/JEE APIs and the fly likes Email Notification when db is getting updated Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » Other JSE/JEE APIs
Reply Bookmark "Email Notification when db is getting updated" Watch "Email Notification when db is getting updated" New topic
Author

Email Notification when db is getting updated

ganesh boil
Greenhorn

Joined: Sep 17, 2009
Posts: 14
Hi team,
I have an application like a shopping cart.
Here I have a table for orders.
And I want to send an email notification to the user with his order details immediately after placing the order.
So can anyone suggest me the way to achieve this? What are the api do I need to use?

And anybody had the code snippet that will be more helpful.

Thanks in advance..

Ganesh
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 35252
    
    7
The best approach would be to trigger all actions from the code that updates the DB, instead of from within the DB. This sounds like business logic that should be kept out of the DB.


Android appsImageJ pluginsJava web charts
Paul Clapham
Bartender

Joined: Oct 14, 2005
Posts: 16483
    
    2

As for the API you would use, its name is JavaMail.
Vinod Tiwari
Ranch Hand

Joined: Feb 06, 2008
Posts: 458
Are you using any workflow engine?? You can send email via Java Mail API.


Vinod Tiwari | Twitter
 
I agree. Here's the link: http://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Email Notification when db is getting updated
 
Similar Threads
Passed Part II with 99%
Private messages
Anyone else NOT get a confirmation email for SCEA Beta Part II?
Java Coding Contest - Java Books to be won
anybody have experience purchasing voucher from this link?