Gossamer Forum
Home : Products : DBMan : Customization :

Email Notification with a BIG Twist

Quote Reply
Email Notification with a BIG Twist
Hello y'all...

I have a current challenge in one of my database programs. Sorry to confuse you again, Carol...I have now implemented a Password Directory program powered by DBMAN at my job. We are using this program to store passwords and userids for our NT Server (For those security freaks out there...don't worry, I have provided a dual login system-one via O'Reilly WebSite1.1 and the other through the DBMAN login screen. No one is allowed to view the database except for certain users with administrative and data entry permissions.) Smile

Anyway, here is my challenge...What I would like to do is create a field known as "Change". This will only be checked in the modification screen when I have successfully changed the user's NT password in the NT User Manager. When this field is checked, then an email message will be sent to the user in the record to notify them that their NT Account has been updated and they can access their account. (This will assist our Help Desk person who currently has to call every user when their password has been updated on the NT Server.) Also, I would only like to send email notifications WHEN their NT accounts have been changed noted by the "Change" field.

I know that I will probably need to modify the validate_record sub-routine. Here is what I have done so far:

In default.cgi, modify_record sub-routine:

1) Added the following code:

Code:
%rec = &get_record($in{$db_key});

AFTER

Code:
my ($status, $line, @lines, @data, $output, $found, $restricted);

2) Added SMTP Mailer statements:

Code:
if (($rec{'Change'} eq 'Yes') && ($rec{'Email'})) {
my $mailer = new Mailer ( { smtp => 'mysmtpserver' } ) or die "Can't init mailer: $Mailer::error";
$mailer->send ( {
to => '$rec{'Email'}',
from => 'webmstr@coco.cc.az.us',
subject => "CCC: NT Account has been Modified",
msg => $modify_body_text
} )
or die "Can't send mail: $Mailer::error";
}

In default.cfg:

1) Added an Email Field
2) Added $modify_body_text

Anyone have any ideas about what I need to add to the validate_record sub-routine that will allow the above stated process to occur.

Currently, without modifying the validate_record sub-routine, the record is modified but the browser hangs and no mail is sent.

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 03, 1999).]

[This message has been edited by Eliot (edited August 03, 1999).]

[This message has been edited by Eliot (edited August 03, 1999).]

[This message has been edited by Eliot (edited August 03, 1999).]

[This message has been edited by Eliot (edited August 03, 1999).]
Subject Author Views Date
Thread Email Notification with a BIG Twist Eliot 5991 Aug 3, 1999, 12:27 PM
Post Re: Email Notification with a BIG Twist
JPDeni 5866 Aug 3, 1999, 7:37 PM
Post Re: Email Notification with a BIG Twist
Eliot 5873 Aug 3, 1999, 7:43 PM
Post Re: Email Notification with a BIG Twist
JPDeni 5857 Aug 3, 1999, 8:14 PM
Post Re: Email Notification with a BIG Twist
Eliot 5869 Aug 3, 1999, 8:22 PM
Post Re: Email Notification with a BIG Twist
Eliot 5870 Aug 4, 1999, 5:25 AM
Post Re: Email Notification with a BIG Twist
Eliot 5857 Aug 4, 1999, 6:57 AM
Post Re: Email Notification with a BIG Twist
Eliot 5849 Aug 4, 1999, 7:52 AM
Post Re: Email Notification with a BIG Twist
JPDeni 5916 Aug 4, 1999, 9:07 AM
Post Re: Email Notification with a BIG Twist
compu_tel 5898 Aug 4, 1999, 10:02 AM
Thread Re: Email Notification with a BIG Twist
Eliot 5881 Aug 4, 1999, 10:50 AM
Thread Re: Email Notification
omegadm 5855 Jul 27, 2000, 8:00 AM
Thread Re: Email Notification
LoisC 5892 Jul 27, 2000, 11:12 AM
Post Re: Email Notification
omegadm 5905 Jul 27, 2000, 3:12 PM
Thread Re: [Eliot] Email Notification with a BIG Twist
mabel 5642 Dec 11, 2002, 12:27 AM
Post Re: [mabel] Email Notification with a BIG Twist
LoisC 5623 Dec 11, 2002, 9:14 PM
Post Re: Email Notification with a BIG Twist
Eliot 5867 Aug 4, 1999, 12:32 PM