sub sendEmail{
my ($to_address, $subject, $content) = @_;
my $boundary = "====" . time() . "====";
my $footer = &getEmailFooter;
%mail = (From => $mddEmail,
To => $to_address,
Subject => $subject,
'content-type' => "multipart/alternative; boundary=\"$boundary\""
);
$boundary = '--'.$boundary;
$content .= &getEmailFooter;
my $plain = encode_qp $content;
$mail{body} = <<END_OF_BODY;
$boundary
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding:
$plain
$boundary
Content-Type: text/html; charset="iso-8859-1"
Content-Transfer-Encoding:
<html>
<pre style="font-size: medium">
$content
</pre>
</html>
$boundary--
END_OF_BODY
sendmail(%mail) || die "Error: $Mail::SendMail::error\n";
}
Main Topics
Browse All Topics





by: ozoPosted on 2009-10-16 at 12:29:48ID: 25592527
where is sub sendEmail?