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

Dear Monks, Our company web page is on a Windows server. I want to send an email message to someone everytime they fill out a form. I am using Net::SMTP. How do you send HTML over in the email message? Basically, I want to make some words bold and add an image. I would use MIME::Lite, but the server does not contain that module and they will not add on any additional modules. Thanks

Replies are listed 'Best First'.
Re: Inserting HTML using Net::SMTP
by friedo (Prior) on Jun 07, 2007 at 15:36 UTC
    MIME::Lite is pure Perl so it should be easy to install locally. Failing that, you can roll your own MIME encoder and do it that way. But it hardly seems worth the trouble.
      Unfortunately, the server that hosts our web page will not install any other modules. How do I do the MIME encoder?
        You don't have to have MIME::Lite installed in the system-wide paths, you can just install it in your user home directory and use lib ('/my/user/home'); to add that to your @INC path at runtime.

        You can do that even without using CPAN.pm. Just download the tarball from CPAN, extract it, create the necessary directory structure in your user home directory (/home/me/MIME/ for example) and drop Lite.pm into it. You might also want MIME::Types and Mail::Address both of which are pure perl, and although it'll be faster at runtime with cpan::MIME::Base64 and MIME::QuotedPrint which both have bits of XS in them, it will get by just fine without them.

        Spending a few minutes getting those things into place will be a lot faster than rolling your own MIME encoder.