PEPPLER.ORG
Michael Peppler
Sybase Consulting
Menu
Home
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
Freeware
Sybperl
Sybase::Simple
DBD::Sybase
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
FAQs
Sybase on Linux FAQ
Sybperl FAQ
Personal
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: LNowak at aol dot com
Subject: Re: reg unix sendmail
Date: Jun 9 2000 5:54PM

Lots of different ways to do it - but basically open sendmail like a file and 
pipe the command that sendmail is looking for along with the body of the 
mail. This has always worked for me so I created a module and just pass it 
arguments. 

Leigh

One of many ways:
#######################################################
$sendmail = "path/to/sendmail";

open(SENDMAIL, "| $sendmail -t");

    print SENDMAIL "To: \n";
    print SENDMAIL "Subject: \n";
    
    foreach $line (@body)
    {
        print SENDMAIL $line;
    }

close (SENDMAIL);
########################################################