If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > auto emailing upon insert

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-22-04, 11:56
djstyli djstyli is offline
Registered User
 
Join Date: Jan 2004
Posts: 3
auto emailing upon insert

I'm using DB2 7.1 on Win NT but my DB is on a UNIX server. I access the DB through PSQL in telnet (putty).

My problem is that I want to send an auto email to any user who creates a new account. This will, for e.g., tell them their new username and password.

I have only been given one hint on how to do this, and that is to do the following:

put a timestamp on every insert
export new inserts to a text file
run a program that checks this text file for new updates (e.g. all inserts within the last 5 mins)
this program then sends email to all new inserts (don't ask me how!)

Is this the best way to do this? are there any other ways??

Any help would be greatly appreciated.
Reply With Quote
  #2 (permalink)  
Old 01-22-04, 12:04
sathyaram_s sathyaram_s is offline
Super Moderator
 
Join Date: Aug 2001
Location: UK
Posts: 4,534
Re: auto emailing upon insert

A trigger and udf together can do the job automatically when you create the user


http://www-106.ibm.com/developerwork...205bhogal.html

Cheers
Sathyaram
__________________
Visit the new-look IDUG Website , register to gain access to the excellent content.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On