Win a copy of The Java Performance Companion this week in the Performance forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Email Notification when db is getting updated

 
ganesh boil
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Rancher
Posts: 42968
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Paul Clapham
Sheriff
Posts: 21128
32
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
As for the API you would use, its name is JavaMail.
 
Vinod Tiwari
Ranch Hand
Posts: 466
1
IntelliJ IDE Java Oracle
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Are you using any workflow engine?? You can send email via Java Mail API.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic