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

Does anybody have any resources with examples on how to use mail with Perl? Thanks, moo

Replies are listed 'Best First'.
(jcwren) Re: using Mail with Perl
by jcwren (Prior) on Aug 22, 2000 at 19:23 UTC
    There's about 25 threads on the site that have talked about this, from using sendmail and NET::SMTP to connecting to sockets directly and using MIME::Lite. Many of them are quite excellent. I would recommend using the search box above, and doing some searching. That search will only search subject titles. You can type 'super search' in the search box, and go to a node that will allow searching the bodies of the messages for such information.

    --Chris

    e-mail jcwren
Re: using Mail with Perl
by davorg (Chancellor) on Aug 22, 2000 at 19:24 UTC
Re: using Mail with Perl
by moo (Acolyte) on Aug 22, 2000 at 21:16 UTC
    Beautiful!
    use Mail::Sendmail;
    
    
      %mail = ( To      => 'you@there.com',
                From    => 'me@here.com',
                Message => "This is a very short message"
               );
    
    
      sendmail(%mail) or die $Mail::Sendmail::error;
    
    
      print "OK. Log says:\n", $Mail::Sendmail::log;
    
    --moo
RE: using Mail with Perl
by KM (Priest) on Aug 22, 2000 at 19:25 UTC
    It depends what you are using to send the mail. Look here for some modules, as well as Net::SMTP, and the MIME::* modules. Choose which you want to use and look at the examples in the docs.

    Cheers,
    KM

Re: using Mail with Perl
by moo (Acolyte) on Aug 22, 2000 at 21:10 UTC
    Thanks everyone! --moo