I've used the "S E N D E M A I L A F T E R R E C O R D I S A D D E D" by JP DENI and also read the "Email notification" (Thead reference: 000639 Forum 12) and after user added a new records, the email message still doesn't appear the adding fields.
I have added the following code in uf_html.pl
sub html_add_success {
at the beginning of the sub :
my (%rec) = &get_record($in{$db_key});
open (MAIL, "$mailprog") || &cgierr("Can't start mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: $html_title New Record\n\n";
print MAIL "The following new record has been added to the database:.\n\n";
foreach $col ($db_cols) {
print MAIL "$col -- $rec{$col}\n";
}
close (MAIL);
The Code :
foreach $col ($db_cols) {
print MAIL "$col -- $rec{$col}\n";
DOESN'T WORK !
Ok, so I replace it with a 1 field:
print MAIL "Your Code is : $rec{$ID}\n";
But the $rec{$ID} print out a blank message.
Could anyone help me about this ?
PS : I have already using the "Send Email Mod" and it's fine.
Thanks.
I have added the following code in uf_html.pl
sub html_add_success {
at the beginning of the sub :
my (%rec) = &get_record($in{$db_key});
open (MAIL, "$mailprog") || &cgierr("Can't start mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: $html_title New Record\n\n";
print MAIL "The following new record has been added to the database:.\n\n";
foreach $col ($db_cols) {
print MAIL "$col -- $rec{$col}\n";
}
close (MAIL);
The Code :
foreach $col ($db_cols) {
print MAIL "$col -- $rec{$col}\n";
DOESN'T WORK !
Ok, so I replace it with a 1 field:
print MAIL "Your Code is : $rec{$ID}\n";
But the $rec{$ID} print out a blank message.
Could anyone help me about this ?
PS : I have already using the "Send Email Mod" and it's fine.
Thanks.