I have installed the "Send email after a record is added mod" which sends me (Admin) an email whenever a new item is posted. I do receive an email but it only contains this: The following new record has been added to the database: (there is no record!!)
I think the problem is within these lines in sub html_add_success:
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);
Can anybody check it for me? Any help will be greatly appreciated. Thanks
I think the problem is within these lines in sub html_add_success:
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);
Can anybody check it for me? Any help will be greatly appreciated. Thanks