Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Email-Send CPAN distribution.

Report information
The Basics
Id: 46909
Status: resolved
Priority: 0/
Queue: Email-Send

People
Owner: Nobody in particular
Requestors: maz [...] mlx.net
Cc:
AdminCc:

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



Subject: bug in get_env_recipients routine of Email::Send::SMTP
Date: Sat, 13 Jun 2009 16:27:25 +0800
To: bug-Email-Send [...] rt.cpan.org
From: John Maslanik <maz [...] mlx.net>
It looks like two lines were added to the get_env_recipients routine of the Email::Send::SMTP library. I'm not a perl monk, but it doesn't seem to me that they would work under any circumstance: sub get_env_recipients { @@ -29,6 +30,8 @@ sub get_env_recipients { my %to = map { $_->address => 1 } map { Email::Address->parse($message->header($_)) } + grep { defined and length } + map { $message->header($_) } qw(To Cc Bcc); return keys %to; So let me see if I read this correctly. 1. run $message->header($1) for To CC and Bcc. The results here will be email addresses. 2. check if defined and has length 3. then run Email::Address->parse($message->header($_)) on email addresses that were the results of the first map command. because of the first map, $_ is set to email addresses, not the "To,Cc, and Bcc" that I think it's expecting. 4. First map command never gets run. I have just commeted out the grep and second map and everything seems to be working. John Maslanik.
CC: undisclosed-recipients: ;
Subject: Re: [rt.cpan.org #46909] bug in get_env_recipients routine of Email::Send::SMTP
Date: Sat, 13 Jun 2009 07:21:37 -0400
To: John Maslanik via RT <bug-Email-Send [...] rt.cpan.org>
From: Ricardo SIGNES <rjbs [...] cpan.org>
* John Maslanik via RT <bug-Email-Send@rt.cpan.org> [2009-06-13T04:28:01] Show quoted text
> > my %to = map { $_->address => 1 } > map { Email::Address->parse($message->header($_)) } > + grep { defined and length } > + map { $message->header($_) } > qw(To Cc Bcc);
Ugh. The point of that refactoring was, in part, to remove the $message->header call from the second line -- which clearly didn't happen. Stupid. I wish I had automated tests for that transport. Fixed. Thank you. -- rjbs
Subject: Re: [rt.cpan.org #46909] bug in get_env_recipients routine of Email::Send::SMTP
Date: Mon, 15 Jun 2009 18:09:21 +0800
To: bug-Email-Send [...] rt.cpan.org
From: John Maslanik <maz [...] mlx.net>
Thank you. John On Jun 13, 2009, at 7:21 PM, Ricardo SIGNES via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=46909 > > > * John Maslanik via RT <bug-Email-Send@rt.cpan.org> > [2009-06-13T04:28:01]
>> >> my %to = map { $_->address => 1 } >> map { Email::Address->parse($message->header($_)) } >> + grep { defined and length } >> + map { $message->header($_) } >> qw(To Cc Bcc);
> > Ugh. > > The point of that refactoring was, in part, to remove the $message-
> >header call
> from the second line -- which clearly didn't happen. Stupid. I > wish I had > automated tests for that transport. > > Fixed. Thank you. > > -- > rjbs >
do not reply -- rjbs