Gossamer Forum
Home : Products : DBMan : Customization :

Archive mailing notice did not work

Quote Reply
Archive mailing notice did not work
I used add mail noctice mod, it works great with add, modify or delete but some how it can not work with archive, after someone archive it, it should mail to me a notice but, it only mail me a header with column only like:

ID blank
Name blank
Status blank


*** blank mean nothing :=)
it should be :
ID 123
Name John Q
Status Married :=)

is it because when we archive it move file from default.db to archive.db so it can not find this file ? how can we fix it ? Blush

Thank you for your help Smile
Quote Reply
Re: [britneythuyduong] Archive mailing notice did not work In reply to
Hi,

Did you try this when the db file is archive.db?

$db_file_name = 'path/to/archive.db';

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Archive mailing notice did not work. Lois and JPdeni help !! In reply to
Hi Tandat,

Because in my default.cfg
# URL of dbman.
$db_script_url = $db_dir_url . "/index.cgi";
# Full Path and File name of the database file.
$db_file_name = $db_script_path . "/default.db";
# Full Path and File name of the database file.
$db_archive_name = $db_script_path . "/archive.db";

and if i change db_file_name from default.db to archive.db i think we will have no file to archive.

It will not run with http://www.jpdeni.com/dbman/Mods/archive.txt

And here is my html.pl
sub html_archive_success {
# --------------------------------------------------------
# This page let's the user know that the records were successfully
# deleted.

my $message = shift;

open (MAIL, "$mailprog") or &cgierr("unable to open mail program");
print MAIL "To: $admin_email\n";
print MAIL "From: $admin_email\n";
print MAIL "Subject: New Archive file\n\n";

foreach $column (@db_cols) {
print MAIL "$column: $rec{$column}\n";
}
print MAIL "\n\n";
close MAIL;

&html_print_headers;
print qq|

What do you think ?Blush I only get header in mail and $column:
but $rec{$column} show nothing Frown
Quote Reply
Re: [britneythuyduong] Archive mailing notice did not work. Lois and JPdeni help !! In reply to
Hi,

Did you check the %rec has so that if has value?

Cheers,

Cheers,

Dat

Programming and creating plugins and templates
Blog
Quote Reply
Re: [tandat] Archive mailing notice did not work. Lois and JPdeni help !! In reply to
Check out this thread:

http://www.gossamer-threads.com/perl/gforum/gforum.cgi?post=118327

4wallaby
Dec 20, 2000
Subject: auto archive

You'll notice there is a sub called sub mail_archive included in the thread. Hope this helps

Unoffical DBMan FAQ

http://creativecomputingweb.com/dbman/index.shtml/