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

I have successfully used the module "libnet-1.0703.tar.gz"-->Net::SMTP to send text mail to an mail account ... however i don't know how to send file attachment ... can the module i have mentioned do so? or use other perl module? urgent ... thx !

Replies are listed 'Best First'.
Re: how to send file attachment in a mail
by Corion (Patriarch) on Mar 05, 2001 at 15:43 UTC
Re: how to send file attachment in a mail
by davorg (Chancellor) on Mar 05, 2001 at 15:44 UTC

    This is a frequently asked question around here. Had you bothered to use Super Search, you would have found a large number of discussion on this subject. The advice you'd get from all these nodes is "use the MIME::Lite module or the MIME-Tools bundle of modules - get them from CPAN".

    --
    <http://www.dave.org.uk>

    "Perl makes the fun jobs fun
    and the boring jobs bearable" - me

Re: how to send file attachment in a mail
by bjelli (Pilgrim) on Mar 05, 2001 at 19:43 UTC

    I've been using Mail::Sender on both Windows and Unix, and it works just fine. An example from the man-page:

    use Mail::Sender; $sender = new Mail::Sender{ smtp => 'smtp.server.com', from => 'your@address.com'}; $sender->MailFile( { to => 'some@address.com', subject => 'Here is the file', msg => "I'm sending you the list you wanted.", file => 'filename.txt'});

    good luck!

    --
    Brigitte    'I never met a chocolate I didnt like'    Jellinek
    http://www.horus.com/~bjelli/         http://perlwelt.horus.at
      Wow Mail::Sender is incredibly easy to use, I got it working after 2 min including the:
      perl -MCPAN -e shell
      install Mail::Sender
      I recomend trying it first.