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

Hi there,
If you've read the title, you'll probably think: why doesn't he want to use modules like MIME::Entity, or MIME::Lite?
Well, because my isp seems to have forgotten a few of them...
Software error: Can't locate Mail/Field/addrlist.pm in @INC
Software error: Can't locate Mail/Field/date.pm in @INC
At the moment, I'm in a kind of war with the isp, and don't feel like asking them to update their modules.
And I also know there is a way to use base64-encoding without having anything to do with other modules...
If you know how, or have another solution, could you PLEASE let me know?
Thanx in advance, Paul
Hail Perl!!!
  • Comment on Sending images as attachments without using modules

Replies are listed 'Best First'.
(jeffa) Re: Sending images as attachments without using modules
by jeffa (Bishop) on May 14, 2002 at 22:13 UTC
      Thanx oh so much!!!
      I got it working by just uploading the dir "MIME" with the three necessary files in it.
      Great!!!
      Thanx a lot for your answer, it worked out just great!
Re: Sending images as attachments without using modules
by rob_au (Abbot) on May 14, 2002 at 23:35 UTC
    While I think that the direction given by jeffa above is your best bet, you can also attach files to emails using uuencoding which can be implemented very easily in your script - For example:

    my $filename = 'test.jpg'; my @results; my $fh = IO::File->new("$filename"); while (read($fh, $buffer, 45)) { push @results, pack("u", $buffer); } $fh->close; print STDOUT "begin 600 ", $filename, "\n", join(@results, "\n"), "end +\n\n";

    As jeffa pointed out though, check out tachyon's A Guide to Installing Modules.