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: Saurabh Goyal <Saurabh_Goyal at citysearch dot com>
Subject: RE: reg unix sendmail
Date: Jun 9 2000 6:23PM

use the following one, will work on unix environment only.

###############
sub ccSendEMail
{
my($to, $from, $subject, $data) = @_;

print "Sending email to:$to";
	
# do not align it, it's a fixed format to sent email (leave as it is)	
open(SENDMAIL, "|/usr/lib/sendmail -oi -t");
# return status as 1 if success or 0 if fails
my $status = print SENDMAIL <<"EOF";
From:$from
To:<$to>
Subject:$subject

$data
EOF
close(SENDMAIL);
return $status;
##################

NOTE: return status 0 means success non-zero means failure

Thanks,
Saurabh

-----Original Message-----
From: venkat Reddy [mailto:chittepu@forindia.com]
Sent: Friday, June 09, 2000 10:38 AM
To: SybPerl Discussion List
Subject: reg unix sendmail


hi,

  Can anyone suggest how to send a mail using sendmail
command through sybperl or perl.please give an example of how to send .

bye
venkat
chittepu
e-mail: chittepu@forindia.com




--------------------------------------------------------

Feed  Your Greed !!!
Get your 10MB Free space only at http://www.forindia.com NOW!

--------------------------------------------------------