[guest - Wed Mar 27 19:25:12 2002]:
Show quoted text> I see that you can add 'debug => "debug.log"' when you create a new
> Sender object but the problem is that debug.log file is overwritten
> every time u send a message. Is there a way to append messages to
> the debug.log so that we have a history of all the messages that
> were sent? Like 'debug => ">>debug.log"'??
>
> my $sndr = new Mail::Sender {from => $from,
> debug => "debug.log",
> smtp => $smtp};
debug => ">debug.log",
should work in current version (though I would consider this a bug and
it will NOT work in new versions)
It would be better to open the filehandle yourself and passed the
handle instead of the filename :
open LOG, '>>debug.log' or die "...";
...
debug => \*LOG,
or
use FileHandle;
my $LOG = new FileHandle;
open $LOG, '>>debug.log' or die "...";
...
debug => $LOG,
There is one "problem" though. The debug=> slows things down.
I made it so that you could find out why are you unable to send mails
through your server, what doesn't the server like on the stuff you do
and so on.
If all you need is to have a file containing the addresses, subjects
and bodies of the messages, you'd better save it yourself.
Jenda