Help for this page

Select Code to Download


  1. or download this
    use strict;
    use Mail::Mailer;
    ...
        or die "Can't open: $!\n";
    print $mailer $body;
    $mailer->close();
    
  2. or download this
    open(SENDMAIL, "|/usr/lib/sendmail -oi -t -odq")
                        or die "Can't fork for sendmail: $!\n";
    ...
    Body of the message goes here, in as many lines as you like.
    EOF
    close(SENDMAIL)     or warn "sendmail didn't close nicely";