Subject: | Mime::Lite bug, 'reply-to' |
Date: | Wed, 3 Feb 2010 15:56:02 -0500 |
To: | bug-MIME-Lite [...] rt.cpan.org |
From: | marko <marko.45.24.75.43 [...] gmail.com> |
M-Windows XP, ActiveState Perl 5.10.0.
Using Mime::Lite as follows:
#create msg struct
my $msg = MIME::Lite->new( From => $sender, 'Reply-To' => $replyto,
'Errors-To' => $errorto , To => $recip, Cc => $ccrecip,
Subject => $SubjLINE, Type =>'TEXT', Data => $TXT );
$msg->attr('content-type.charset' => 'ISO-8859-1'); # 'UTF-8',
'ISO-8859-1' options for character encoding
The code had no problem before I added 'Reply-To'. Now the message is
sent, but I see this error:
Use of uninitialized value $value in concatenation (.) or string at C:/Perl/site
/lib/MIME/Lite.pm line 1207.
LITE.PM code:
sub add {
my $self = shift;
my $tag = lc(shift);
my $value = shift;
### If a dangerous option, warn them:
Carp::carp "Explicitly setting a MIME header field ($tag) is dangerous:\n"
. "use the attr() method instead.\n"
if ( is_mime_field($tag) && !$QUIET );
### Get array of clean values:
my @vals = ( ( ref($value) and ( ref($value) eq 'ARRAY' ) )
? @{$value}
#<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< 1207
: ( $value . '' )
);
map { s/\n/\n /g } @vals;
### Add them:
foreach (@vals) {
push @{ $self->{Header} }, [ $tag, $_ ];
}
}