Skip Menu |

This queue is for tickets about the CPANPLUS CPAN distribution.

Report information
The Basics
Id: 34345
Status: resolved
Priority: 0/
Queue: CPANPLUS

People
Owner: Nobody in particular
Requestors: ilmari.vacklin [...] cs.helsinki.fi
Cc:
AdminCc:

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



Subject: Should be able to send reports via system sendmail
It is currently impossible to configure CPANPLUS to send test reports via the system sendmail. This is important e.g. when the system is a laptop and sendmail provides a reliable SSL SMTP connection to a server that the user authenticates against. This method can be the only reliable SMTP method from the laptop. Test::Reporter provides two flags for new() to control its behaviour that affect this bug: "transport" should be set to "Mail::Send", and "mail_send_args" should be set to ["sendmail"]. When both flags are set, Test::Reporter will tell Mail::Send (and Mail::Send will tell Mail::Mailer) to use the system sendmail. These should be added to CPANPLUS::Internals::Report::_send_report, line 501 onwards, i.e. my $report = Test::Reporter->new(..., transport => $conf->get_conf("cpantest_transport"), mail_send_args => $conf->get_conf("cpantest_mail_send_args")) or so. Another option would be to add SSL/TLS support to the SMTP framework provided by Mail::Send. This is much more work, however, and all of it is outside CPANPLUS.
On Sat Mar 22 06:24:15 2008, ilmari.vacklin@cs.helsinki.fi wrote: Show quoted text
> It is currently impossible to configure CPANPLUS to send test reports > via the system sendmail. This is important e.g. when the system is a > laptop and sendmail provides a reliable SSL SMTP connection to a server > that the user authenticates against. This method can be the only > reliable SMTP method from the laptop. > > Test::Reporter provides two flags for new() to control its behaviour > that affect this bug: "transport" should be set to "Mail::Send", and > "mail_send_args" should be set to ["sendmail"]. When both flags are set, > Test::Reporter will tell Mail::Send (and Mail::Send will tell > Mail::Mailer) to use the system sendmail. These should be added to > CPANPLUS::Internals::Report::_send_report, line 501 onwards, i.e. > > my $report = Test::Reporter->new(..., transport => > $conf->get_conf("cpantest_transport"), mail_send_args => > $conf->get_conf("cpantest_mail_send_args")) > > or so. > > Another option would be to add SSL/TLS support to the SMTP framework > provided by Mail::Send. This is much more work, however, and all of it > is outside CPANPLUS.
I notice that test::reporter is having dev releases now that address transport and tls/ssl issues: http://search.cpan.org/~dagolden/Test-Reporter-1.39_06/ I've asked it's author, david golden, to comment on this implementation.
On Sun May 18 10:23:20 2008, KANE wrote: Show quoted text
> I notice that test::reporter is having dev releases now that address > transport > and tls/ssl issues: > > http://search.cpan.org/~dagolden/Test-Reporter-1.39_06/ > > I've asked it's author, david golden, to comment on this > implementation.
It's pretty straightforward using transport(). As per the documentation: $reporter->transport( 'Net::SMTP::TLS', Username => 'jdoe', Password => '123' ); The first argument specifies a Test::Reporter::Transport subclass, in this case Test::Reporter::Transport::Net::SMTP::TLS -- the remaining arguments are passed directly to the underlying Net::SMTP::TLS constructor. These can also be specified in the Test::Report constructor: my $report = Test::Reporter->new( transport => 'Net::SMTP::TLS', transport_args => [ User => 'Joe', Password => '123' ], ); -- David
I've just applied a patch that lets you set reporter args in your config as described by DAGOLDEN: =item cpantest_reporter_args A hashref of key => value pairs that are passed to the constructor of C<Test::Reporter>. If you'd want to enable TLS for example, you'd set it to: { transport => 'Net::SMTP::TLS', transport_args => [ User => 'Joe', Password => '123' ], } =cut