Skip Menu |

This queue is for tickets about the MailTools CPAN distribution.

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

People
Owner: Nobody in particular
Requestors: jgmyers [...] proofpoint.com
Cc:
AdminCc:

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



Subject: Mail::Send::open broken for type 'smtp'
The following script dies due to the failure of the Mail::Send::open call. Reading the source code, the open method would appear to fail for any type that doesn't have an exe. sub mail { my ($to, $subject, $body) = @_; use Mail::Send; my $msg = Mail::Send->new(); $msg->to($to); $msg->subject($subject); my $fh = $msg->open('smtp', Server => 'mail', Debug => 1) or die ("Couldn't open Mail::Send message"); print $fh $body; $fh->close; } mail('user@example.com', 'mailtest', "body");
On Ma. jan. 16 15:14:55 2006, guest wrote: Show quoted text
> The following script dies due to the failure of the Mail::Send::open > call. Reading the source code, the open method would appear to fail for > any type that doesn't have an exe.
No, Mail::Mailer is called, which installs Mail::Mailer::smtp, which on its turn overrules sub exec(). Your script works on my system, so something else is wrong.
Subject: Re: [rt.cpan.org #17093] Mail::Send::open broken for type 'smtp'
Date: Mon, 16 Jan 2006 12:45:38 -0800
To: bug-MailTools [...] rt.cpan.org
From: "John Myers" <jgmyers [...] proofpoint.com>
via RT wrote: Show quoted text
> No, Mail::Mailer is called, which installs Mail::Mailer::smtp, which on > >its turn overrules sub exec(). >
It never gets to sub exec(). Mail::Mailer::open returns on the following line: 260: my $exe = *$self->{Exe} or return (); $self->{Exe} was set from: 250: %{*$glob} = (Exe => $exe, 251: Args => [ @args ] 252: ); which in turn was set from: 236: my $exe = $Mailers{$type};
You are right... 1.70 enabled an old-time disabled "croak" (from before my time as maintainer). I accidentally ran your script with an other version of the code. This is an urgent fix, so a new release is made to CPAN immediately.
use 1.73