Skip Menu |

This queue is for tickets about the Mail-SendVarious CPAN distribution.

Report information
The Basics
Id: 72642
Status: resolved
Priority: 0/
Queue: Mail-SendVarious

People
Owner: MUIR [...] cpan.org
Requestors: adyer [...] yuikee.com.hk
Cc:
AdminCc:

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



Subject: Bug report: addresses in envelope_to are lost
Date: Wed, 23 Nov 2011 14:28:00 +0800
To: bug-Mail-SendVarious [...] rt.cpan.org
From: Allan Dyer <adyer [...] yuikee.com.hk>
Mail-SendVarious-0.3 perl, v5.10.1 Linux bluewhale 2.6.32-5-686 #1 SMP Mon Jun 13 04:13:06 UTC 2011 i686 GNU/Linux I experienced this problem when using the sendmail() function, setting an address in envelope_to results in mail being sent to the invalid address 1, use two addresses, and the address 2 is used. A list is being used in a scalar context. This is my code to demonstrate the problem: #!/usr/bin/perl # # Show bug in Mail::SendVarious use strict; use warnings; use Mail::SendVarious qw(make_message); use vars qw($from $message @envelope_to); ($from, $message, @envelope_to) = make_message( from => 'user@host', envelope_to => 'user@host, user@host', body => 'body stuff' ); print "Using envelope_to:\n", join("\n", @envelope_to), "\n"; ($from, $message, @envelope_to) = make_message( from => 'user@host', to => 'user@host, user@host', body => 'body stuff' ); print "Using to:\n", join("\n", @envelope_to), "\n"; ----- Output: Using envelope_to: 2 Using to: user@host user@host ----- Fix: I looked at SendVarious.pm and noted || being used where it would give scalar context to an array during assignment. Splitting the assignment to two lines avoids the problem. diff output 89c89,90 < my @to = splitto($options{envelope_to}) || (splitto($options{to}), splitto($options{cc})); --- Show quoted text
> my @to = splitto($options{envelope_to}); > @to = (splitto($options{to}), splitto($options{cc})) unless @to;
Regards Allan Dyer
Fixed in release 0.4. Your report prompted the release.
Subject: Re: [rt.cpan.org #72642] Bug report: addresses in envelope_to are lost
Date: Fri, 06 Jan 2012 17:55:22 +0800
To: bug-Mail-SendVarious [...] rt.cpan.org
From: Allan Dyer <adyer [...] yuikee.com.hk>
Thank you, using 0.4 now. On 06/01/2012 09:17, David_Muir_Sharnoff via RT wrote: Show quoted text
> <URL: https://rt.cpan.org/Ticket/Display.html?id=72642> > > Fixed in release 0.4. Your report prompted the release.