Hey Suresh,

Friday, July 06, 2001, 1:15:22 PM, my MUA believes you used
(X-Mailer not set) to write:

SBAS> Any one will help me out to send e-mail with the help of code in
SBAS> my perl script.

There are lots of ways, I happen to like this one.

use Net::SMTP;

sendMail();

sub sendMail {
    my $MailTo = "user\@mailhost.com";
    my $Subject = "Subject:text here";
    my $MessageBody = "The message";

    my $smtp = Net::SMTP->new("204.23.123.84");
    $smtp->mail($MailTo); # envelope bits
    $smtp->to($MailTo); # envelope bits
    $smtp->data(); # Now for the message itself
    $smtp->datasend("From: $MailTo\n");
    $smtp->datasend("To: $MailTo\n");
    $smtp->datasend("$Subject\n\n");
    $smtp->datasend("$MessageBody");
    $smtp->dataend(); # end the message
    $smtp->quit;
}

-- 
[EMAIL PROTECTED]
Using The Bat! (http://www.ritlabs.com/the_bat/) eMail v1.53d
Windows NT 5.0.2195 (Service Pack 1)
"Buffet".  A French word that means "Get up & get it yourself!"


NetZero Platinum
No Banner Ads and Unlimited Access
Sign Up Today - Only $9.95 per month!
http://www.netzero.net

Reply via email to