home *** CD-ROM | disk | FTP | other *** search
/ PC Professionell 2004 December / PCpro_2004_12.ISO / files / webserver / tsw / TSW_3.4.0.exe / Apache2 / perl / sendmail.pm < prev    next >
Encoding:
Perl POD Document  |  2003-09-22  |  555 b   |  18 lines

  1. package Mail::Mailer::sendmail;
  2. use vars qw(@ISA);
  3. require Mail::Mailer::rfc822;
  4. @ISA = qw(Mail::Mailer::rfc822);
  5.  
  6.  
  7. sub exec {
  8.     my($self, $exe, $args, $to) = @_;
  9.     # Fork and exec the mailer (no shell involved to avoid risks)
  10.  
  11.     # We should always use a -t on sendmail so that Cc: and Bcc: work
  12.     #  Rumor: some sendmails may ignore or break with -t (AIX?)
  13.     # Chopped out the @$to arguments, because -t means
  14.     # they are sent in the body, and postfix complains if they
  15.     # are also given on comand line.
  16.     exec( $exe, '-t', @$args );
  17. }
  18.