* Slaven_Rezic via RT (bug-MailTools@rt.cpan.org) [071019 13:32]:
Show quoted text> Fri Oct 19 09:32:58 2007: Request 30119 was acted upon.
> Transaction: Ticket created by SREZIC
> Queue: MailTools
> Subject: testfile Mailer problems (outfile, uncaught opens, cc)
> Broken in: 1.77
>
> According to the Mail::Mailer documentation the
> $Mail::Mailer::testfile::config{outfile} variable can be used to set the
> mail output file. Unfortunately, if Mail::Mailer::testfile is loaded
> later (which is normally the case, as Mail:Mailer loads the required
> module), then a custom changed output file will be overwritten by the
> default.
There is a lot wrong with the MailTools code, and I do not want
to break existing environments...
Show quoted text> Probably the %config hash should be set in a different way, i.e.
> $config{outfile} = "mailer.testfile" if !defined $config{outfile};
> Also, there's no indication if writing to the testfile failed. At least
> there should be a warning message, but maybe both open's should just die
> in case of errors.
Agreed: changed to
my $outfn = $Mail::Mailer::testfile::config{outfile} || 'mailer.testfile';
open F, '>>', $outfn
or die "Cannot append message to testfile $outfn: $!";
Show quoted text> Last, I think it's not to hard to add also the CC to the mail header in
> the output. In this case can_cc could be set to 1 or removed completely.
In Mail::Mailer, the call to $exe is prepared. When can_cc is false, then
those addresses are added to the \@to list of the command. Within the
testfile, these addresses are printed above the message itself. So:
by setting this to false, the view on which destinations are reached is
more complete than setting it to true.
Changes will be included in 2.00_04
--
Regards,
MarkOv
------------------------------------------------------------------------
Mark Overmeer MSc MARKOV Solutions
Mark@Overmeer.net solutions@overmeer.net
http://Mark.Overmeer.net http://solutions.overmeer.net