Sending emails with Perl

From: jshmoo (
Date: 03/25/04

Date: Thu, 25 Mar 2004 11:18:58 -0600

I'm trying to create a perl script that will read in a text file and send
out emails.

I want to have both html and plain text to send, but I don't want to have
the message in the perl script. I'd like to be able to use templates, so
that I can use the same perl script for different messages. Also, I need
to be able to use variables and substitute them for specific values.

I tried using HTML::Template which works great, but I used an HTML.tmpl
and a text.tmpl. How can I combine these so that I can use both in the
perl script, use the appropriate content-type, and the recipient gets the
"appropriate" message--either text or HTML.

Should I be using a different module? Would Mail::Bulkmail be better? If
so, how would I use that one?

Thank you for your help.