Mohammed Gazal wrote: > Hello , > > When i try to send email from a solaris system with perl Mail::Mailer i > get the error "Bad file number at > /usr/lib/perl5/site_perl/5.005/Mail/Mailer.pm line > 267." > > This is my example script > > #!usr/local/bin/perl > ###################################### > use Mail::Mailer; > > my $mailserver = "mail.mycompany.com"; > my $mailer = new Mail::Mailer('smtp', Server => $mailserver); > > my %headers=(); > $headers{'To'} = "[EMAIL PROTECTED]"; > $headers{'From'} = "administrator";
Works for me (ASP 5.6) after modifying only the To address - you might want to add a domain for the From address to be consistent. > $headers{'Subject'} = "TEST" ; > > $mailer->open(\%headers); > print $mailer "Small test\n"; > $mailer->close; > > ###################################### > > > When I run the script I get this error. > > "Bad file number at /usr/lib/perl5/site_perl/5.005/Mail/Mailer.pm line > 267." > > when i try telnet mail.mycompany.com 25 i get the connection properly > and i can send mail from the telnet connection properly. So it does not seem > there is a issue with the connection with mail server. What could be other > possible reasons for this error message? Please help. -- ,-/- __ _ _ $Bill Luebkert Mailto:[EMAIL PROTECTED] (_/ / ) // // DBE Collectibles Mailto:[EMAIL PROTECTED] / ) /--< o // // Castle of Medieval Myth & Magic http://www.todbe.com/ -/-' /___/_<_</_</_ http://dbecoll.tripod.com/ (My Perl/Lakers stuff) _______________________________________________ Perl-Unix-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs