Michael Peppler
Sybase Consulting
Sybase on Linux
Install Guide for Sybase on Linux
General Sybase Resources
General Perl Resources
BCP Tool
Bug Tracker
Mailing List Archive
Downloads Directory
Sybase on Linux FAQ
Sybperl FAQ
Michael Peppler's resume

sybperl-l Archive

Up    Prev    Next    

From: Konrad Zak <konrad at uni dot wroc dot pl>
Subject: Re: reg unix sendmail
Date: Jun 10 2000 9:34AM


sybperl has nothing to do with that
(as long as you don't want to send data extracted from sybase),
this is the way i do it with perl:

first install Mail:Sendmail module with CPAN, if you don't have CPAN
module installed, just download it, unpack and follow instructions,
installing and using CPAN is a good idea in case you are going to use
perl intensivly, after installing CPAN just type:

[root@wingman]# perl -MCPAN -e'install Mail::Sendmail'

and then prepare Perl code:

#!/usr/bin/perl5 -w

use Mail::Sendmail;

my %mail;

%mail = ( To      => "konrad\",
         #Cc      => "someone\",
          From    => "you\",
          Subject => "subject",
          Message => "message body goes here");

sendmail(%mail) or die $Mail::Sendmail::error;
# and optionally
print "Log says:\n", $Mail::Sendmail::log;

and it's perfectly done
remember to change first line to point Perl in your system and to put
'\' before each '@' sign in addresses.
best regards
  Konrad Zak
  The Interfaculty Lab of Computer Networks and Software
  University of Wroclaw, Wroclaw, POLAND
  +48 71 3201417

venkat Reddy wrote:
> 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:
> --------------------------------------------------------
> Feed  Your Greed !!!
> Get your 10MB Free space only at NOW!
> --------------------------------------------------------