Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi all,
I would like to send email in the form of HTML format. I hope Mail::Sender module will support to send HTML format mail.

I would like to send images (embeded images) along with the html format.
Is it possible to do that using Perl?

Which module is best to use ? Thanks
  • Comment on How can I send HTML email with embeded images?

Replies are listed 'Best First'.
Re: How can I send HTML email with embeded images?
by davorg (Chancellor) on Feb 14, 2007 at 08:50 UTC
Re: How can I send HTML email with embeded images?
by Corion (Patriarch) on Feb 14, 2007 at 08:49 UTC

    MIME::Lite is the best module to use for that, but you should be aware that embedded images often are a high spam indicator.

      The way to include images in your HTML so they get used in the HTML mail, is by using the "cid:" (pseudo-)protocol (short for "content ID"), as described in RFC 2111, with sample code available for various languages on the web, and for Perl in the docs for MIME::Lite.
Re: How can I send HTML email with embeded images?
by Anonymous Monk on Feb 14, 2007 at 08:56 UTC
Re: How can I send HTML email with embeded images?
by GrandFather (Saint) on Feb 14, 2007 at 08:54 UTC

    MIME::Lite does all that in a fairly easy fashion. I have no experience with Mail::Sender, but I'd guess if you read the documentation you will find it can do it too. You could for example look at the sample "Sending HTML messages with inline images" provided in the Mail::Sender documentation.


    DWIM is Perl's answer to Gödel