Subject: | MIME::Lite-3.020 don`t send emails to more than one CC and BCC recepients over SMTP method |
Date: | Thu, 8 Nov 2007 19:43:27 +0600 |
To: | bug-MIME-Lite [...] rt.cpan.org |
From: | "Pavel V. Rochnyack" <rochnyack [...] ngs.ru> |
Hi !
I found a bug in MIME::Lite and check it in versions 3.01 and 3.020.
Module don`t send e-mails because it extract only one CC and
one BCC recepient addresses. Proposed patch will fix this problem.
The sendmail method does not needed to extract these values.
Sendmail does all hard work for us himself.
--- Lite.pm.orig 2007-08-28 19:04:16.000000000 +0700
+++ Lite.pm 2007-11-08 19:29:38.000000000 +0600
@@ -2831,9 +2831,11 @@
my @hdr_to = extract_only_addrs( scalar $self->get('To') );
if ($AUTO_CC) {
foreach my $field (qw(Cc Bcc)) {
- my $value = $self->get($field);
- push @hdr_to, extract_only_addrs($value)
- if defined($value);
+ my @addresses = $self->get($field);
+ foreach my $value (@addresses) {
+ push @hdr_to, extract_only_addrs($value);
+ }
}
}
Carp::croak "send_by_smtp: nobody to send to for host '$hostname'?!\n"
--
Best regards,
Pavel mailto:rochnyack@ngs.ru