Skip Menu |
 

This queue is for tickets about the MailTools CPAN distribution.

Report information
The Basics
Id: 30119
Status: resolved
Priority: 0/
Queue: MailTools

People
Owner: Nobody in particular
Requestors: SREZIC [...] cpan.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 1.77
Fixed in: (no value)



Subject: testfile Mailer problems (outfile, uncaught opens, cc)
Download (untitled) / with headers
text/plain 808b
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. 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. 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. Regards, Slaven
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #30119] testfile Mailer problems (outfile, uncaught opens, cc)
Date: Mon, 22 Oct 2007 00:24:58 +0200
To: Slaven_Rezic via RT <bug-MailTools [...] rt.cpan.org>
From: Mark Overmeer <website [...] craneveer.nl>
* 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
fixed in 2.00_04


This service is sponsored and maintained by Best Practical Solutions and runs on Perl.org infrastructure.

Please report any issues with rt.cpan.org to rt-cpan-admin@bestpractical.com.