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.)
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:
AFTER
2) Added SMTP Mailer statements:
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).]
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.)
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).]