Oh my. I've spent hours trying to get it so an email containing a new record gets sent to the admin. I have scoured the posts, boards, and sites. Wonderful! But it won't work. When the new record is created, mail gets sent and everything works up until the part where the record data should be. Then nothing.
Here's what I have in html.pl, in the sub html_add_success:
open (MAIL, "$mailprog") or &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 Added\n\n";
print MAIL "-" x 75 . "\n\n";
print MAIL "The following record was added to $html_title\n\n";
foreach $column ($db_cols) {
print MAIL "$column: $in{$column}\n";
}
close MAIL;
My .cfg file includes
$mailprog = "|/usr/sbin/sendmail -t -oeq";
which must at least be the right path, since mail is sent, to the right address etc. The headers are right, the Subject includes the name of my database. Just no data. None!
Please, o brilliant and generous thinkers of dbman, help this poor soul!
Here's what I have in html.pl, in the sub html_add_success:
open (MAIL, "$mailprog") or &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 Added\n\n";
print MAIL "-" x 75 . "\n\n";
print MAIL "The following record was added to $html_title\n\n";
foreach $column ($db_cols) {
print MAIL "$column: $in{$column}\n";
}
close MAIL;
My .cfg file includes
$mailprog = "|/usr/sbin/sendmail -t -oeq";
which must at least be the right path, since mail is sent, to the right address etc. The headers are right, the Subject includes the name of my database. Just no data. None!
Please, o brilliant and generous thinkers of dbman, help this poor soul!