Results 1 to 2 of 2
  1. #1
    Join Date
    Jan 2004
    Posts
    3

    Unanswered: 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.

  2. #2
    Join Date
    Aug 2001
    Location
    UK
    Posts
    4,650

    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.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •