Subject: | boundary not set for $mail_msg->print() |
I've the following code:
# encode the reports
my $msg = new MIME::Lite
'From' => "report generator",
'Subject' => "your reports",
'Data' => $output;
# no images
if (!$images_included) {
$msg->attr("Content-Type" => "text/html");
# images - attach
} else {
$msg->attr("Content-Type" => "multipart/related");
foreach (@encoded_imgs) {
$msg->attach($_);
}
}
# Output html file
my $outfile = $conf->{_output_dir}."out.html";
open(OUT, ">$outfile");
$msg->print(\*OUT);
close(OUT);
For this code, I get the following warnings:
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.0/MIME/Lite.pm line 2096.
Use of uninitialized value in concatenation (.) or string at
/usr/lib/perl5/site_perl/5.8.0/MIME/Lite.pm line 2101.
The reason for the warnings is that $boundary is not being set, and that
is because $self->attr('content-type.boundary') isn't set.
Cheers,
Stella