I would like to know if there is a way to send a confirmation message to registered users every time they add, felete, or modify a record. I have read through various threads in this forum, but there is no direct answer for this challenge. I thought this thread was the most appropriate.
Basically, what I am looking for is a way to automatically send an email message to the record owner, not an administrator or data manager.
I have tried the following:
1) Inserted these codes into the
add_record,
modify_record, and
delete_record sub-routines:
Code:
%rec = &get_record($in{$db_key});
2) Then in the "sendmail section",I've added these abridged set of codes:
Code:
open (MAIL, "$mailprog") | | &cgierr("unable to open mail program");
print MAIL "To: $rec{'Email'}\n";
print MAIL "From: $webmaster\n";
close (MAIL);
I have added these codes after the call for the success sub-routine, such as
&html_modify_success;.
No message is sent to the record owner. I apologize if this is a cross-posting, but the other Topics that I read did not answer my question.
I know that I may have to insert these codes:
Code:
open (PASSWD, "<$auth_pw_file") | | &cgierr("unable to open password file. Reason: $!\n");
@passwds = <PASSWD>; close PASSWD;
but I don't know exactly how I would code the cgi script to send a message to the record owner.
Any help would be greatly appreciated.
TIA.
Regards,
------------------
Eliot Lee
Founder and Editor
Anthro TECH, L.L.C
http://www.anthrotech.com/
info@anthrotech.com
==========================
Coconino Community College
http://www.coco.cc.az.us/
Web Technology
Coordinator
elee@coco.cc.az.us
[This message has been edited by Eliot (edited August 01, 1999).]
[This message has been edited by Eliot (edited August 01, 1999).]