I've installed the email_after_add modification. It sends an email to the admin and the user. However, the admin email does not contain any of the record that was added -- just the default language. I've pasted the mod as it is installed in sub html_add_success portion of the html.pl file.
Thanks,
John
open (MAIL, "$mailprog") || &cgierr("Can't start mail program");
########
# Be sure to change the name of the field below to match your email
# field name
########
print MAIL "To: $rec{'Email'}\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Welcome to $html_title\n\n";
#######
# Be sure to write your welcome message. You may use the $rec{'FieldName'}
# variables to include values from the record if you wish.
#######
print MAIL "Enter your welcome message here.";
close (MAIL);
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);
Thanks,
John
open (MAIL, "$mailprog") || &cgierr("Can't start mail program");
########
# Be sure to change the name of the field below to match your email
# field name
########
print MAIL "To: $rec{'Email'}\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: Welcome to $html_title\n\n";
#######
# Be sure to write your welcome message. You may use the $rec{'FieldName'}
# variables to include values from the record if you wish.
#######
print MAIL "Enter your welcome message here.";
close (MAIL);
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);