[JaxPM] generating html email

Steve Lane sml at zfx.com
Wed Sep 19 13:43:01 CDT 2001


On the jacksonville-pm-list; Jax.PM'er Steve Lane <sml at zfx.com> wrote -

Jeff Keith wrote:
> Hello all,
> 
> I need to generate an HTML email from within a Perl script.
> 
> Does anyone have ideas how to accomplish this?

i've done a bunch of this.  the simplest way is to just
use a full .html document as the body of the message,
and use a "Content-type: text/html" header.  no sweat
here, no other modules required.  if this solution
works for you, just do it.

the next step up might involve looking at what the
"big guys" do.  most of the big spammers are sending
multipart messages, with either 'multipart/alternative'
or 'multipart/mixed' as the Content-Type.  the two
types are handled very differently by email readers.

if you want to generate multipart emails (or email
with attachments), i recommend the MIME::Entity
module.  figuring out how to use it was a little
awkward for me, but it does a lot of heavy lifting
that i wouldn't try to do myself.
--
Steve Lane <sml at zfx.com>

Jax.PM Moderator's Note:
This message was posted to the Jacksonville Perl Monger's Group listserv.
The group manager can be reached at -- owner-jacksonville-pm-list at pm.org
to whom send all praises, complaints, or comments...




More information about the Jacksonville-pm mailing list