Stories
Slash Boxes
Comments
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
 Full
 Abbreviated
 Hidden
More | Login | Reply
Loading... please wait.
  • by Mr_Perl (2788) on 2002.02.04 16:02 (#4084)
    MIME::Lite!

    I love it:

    my $msg=MIME::Lite->new(
      From => $hr->{'email'},
      To => ADMINISTRATOR_EMAIL,
      Subject => "New Applicant",
      Type => 'TEXT',
      Data => "The application for $hr->{'name'} is attached to this email message in HTML format.\nOpen it in your web browser to view or print.",
    );
           
    $msg->attach(
      Type => "text/html",
      Data => $app,
      Disposition => 'attachment',
      Filename =>'application.html',
    );

    $msg->send;
    • MIME::Lite uses sendmail (by default). You can also tell it to send mail by SMTP (uses Net::SMTP) or provide your own handler (a subroutine ref) using whatever method you choose.