sub send_email_html {
local($to, $from, $subject, $bodyHTML, $bodyTEXT) = @_;
open (MAIL,"|$sendmailprog -t") || &return_error("500", "Sendmail error");
print MAIL "To: $to\n";
print MAIL "From: $from\n";
print MAIL "Subject: $subject\n";
print MAIL "MIME-Version: 1.0\n";
print MAIL "Content-Transfer-Encoding: quoted-printable\n";
print MAIL "Content-type: multipart/alternative; ";
print MAIL " boundary = unique-boundary-1\n";
print MAIL "This is a MIME encoded message.\n";
print MAIL "\n";
print MAIL "--unique-boundary-1\n";
print MAIL "Content-type: text/plain; charset=US-ASCII\n";
print MAIL "\n";
print MAIL "$bodyTEXT\n";
print MAIL "\n";
print MAIL "--unique-boundary-1\n";
print MAIL "Content-type: text/html; charset=US-ASCII\n";
print MAIL "\n";
print MAIL "$bodyHTML\n";
close (MAIL);
}
####
use Mail::Bulkmail;
$bulk = Mail::Bulkmail->new(
Smtp => '127.0.0.1',
From => 'from@myhost.com',
Subject => 'attempt using mail bulkmail',
Message => $body{html},
HTML => 1,
);
$bulk->mail($toAddy);