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'
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Type: text/plain; charset="utf8"
Content-Disposition: inline
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
Content-Length: 521
Download (untitled) / with headers
text/plain 521b
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");
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-22141-1137443068-1177.17093-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 390
Download (untitled) / with headers
text/plain 390b
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.
MIME-Version: 1.0
X-Spam-Status: No, hits=-1.4 required=8.0 tests=BAYES_00,FORGED_RCVD_HELO,SPF_NEUTRAL
In-Reply-To: <rt-3.5.HEAD-22141-1137443068-1177.17093-6-0 [...] rt.cpan.org>
X-Accept-Language: en-us, en
Received-SPF: neutral (x1.develooper.com: 207.111.236.30 is neither permitted nor denied by domain of jgmyers [...] proofpoint.com)
References: <RT-Ticket-17093 [...] rt.cpan.org> <rt-3.5.HEAD-22141-1137443068-1177.17093-6-0 [...] rt.cpan.org>
Content-Type: text/plain; charset=UTF-8; format=flowed
X-RT-Original-Encoding: utf-8
Received: from la.mx.develooper.com (x1.develooper.com [63.251.223.170]) by diesel.bestpractical.com (Postfix) with SMTP id 051F74D806E for <bug-MailTools [...] rt.cpan.org>; Mon, 16 Jan 2006 15:46:15 -0500 (EST)
Received: (qmail 15814 invoked by alias); 16 Jan 2006 20:45:45 -0000
Received: from www30.proofpoint.com (HELO clyde.extreme-email.com) (207.111.236.30) by la.mx.develooper.com (qpsmtpd/0.28) with ESMTP; Mon, 16 Jan 2006 12:45:43 -0800
Received: from [10.23.8.70] ([10.23.8.70]) by clyde.extreme-email.com (Netscape Messaging Server 4.15) with ESMTP id IT7DO200.171 for <bug-MailTools [...] rt.cpan.org>; Mon, 16 Jan 2006 12:45:38 -0800
Delivered-To: cpan-bug+mailtools [...] diesel.bestpractical.com
Subject: Re: [rt.cpan.org #17093] Mail::Send::open broken for type 'smtp'
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.12) Gecko/20050915
Return-Path: <jgmyers [...] proofpoint.com>
X-Spam-Check-BY: la.mx.develooper.com
X-Original-To: bug-MailTools [...] rt.cpan.org
Date: Mon, 16 Jan 2006 12:45:38 -0800
Message-Id: <43CC05F2.6030008 [...] proofpoint.com>
To: bug-MailTools [...] rt.cpan.org
Content-Transfer-Encoding: 7bit
From: "John Myers" <jgmyers [...] proofpoint.com>
X-RT-Original-Encoding: utf-8
RT-Message-ID: <rt-3.5.HEAD-22147-1137444380-1532.17093-0-0 [...] rt.cpan.org>
Content-Length: 475
Download (untitled) / with headers
text/plain 475b
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};
MIME-Version: 1.0
In-Reply-To: <rt-3.5.HEAD-22147-1137444380-1532.17093-0-0 [...] rt.cpan.org>
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-22124-1137485294-319.17093-0-0 [...] rt.cpan.org>
References: <RT-Ticket-17093 [...] rt.cpan.org> <rt-3.5.HEAD-22141-1137443068-1177.17093-6-0 [...] rt.cpan.org> <43CC05F2.6030008 [...] proofpoint.com> <rt-3.5.HEAD-22147-1137444380-1532.17093-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 237
Download (untitled) / with headers
text/plain 237b
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.
MIME-Version: 1.0
X-Mailer: MIME-tools 5.418 (Entity 5.418)
Content-Disposition: inline
Message-Id: <rt-3.5.HEAD-26273-1138109223-93.17093-0-0 [...] rt.cpan.org>
Content-Type: text/plain; charset="utf8"
Content-Transfer-Encoding: binary
X-RT-Original-Encoding: utf-8
X-RT-Original-Encoding: utf-8
Content-Length: 8
use 1.73


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.