Hi, I want to send an e-mail from perl script.... i have following script...but i am getting following error.....
does anybody have any idea, why it is failing ? ============== following is error message ------ Couldnt make Connection: Unknown error ------- following is script ================= #!C:\usr\bin\bin\perl -w sub send_mail { my ( $to, $subject , @body)=@_ ; use NET::SMTP ; my $relay="ivhpxc0003.ap.bdi.gte.com"; my $smtp=Net::SMTP->new($relay) ; die " Couldnt make Connection: $!\n" if (! defined $smtp) ; $smtp->mail($from) ; $smtp->to($to); $smtp->data(); $smtp->datasend("TO: $to\n"); $smtp->datasend("From: $from\n"); $smtp->datasend("Subject: $subject \n"); $smtp->datasend ("\n" ) ; foreach (@body) { $smtp->datasend("$_ \n") ; } $smtp->dataend() ; $smtp->quit ; } @body=( "This is a TEST MESSAGE" ) ; send_mail('[EMAIL PROTECTED]', "hello", @body); =========== __________________________________________________ Do you Yahoo!? Yahoo! Mail Plus - Powerful. Affordable. Sign up now. http://mailplus.yahoo.com -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]