On 06/06/2002 22:00:09 Yi Zhang wrote:
>I tried the following to use SMTP to send email: > > >use Net::SMTP; >$optServer = 'luxn.com'; >$optFrom = "[EMAIL PROTECTED]"; >$optTo = "[EMAIL PROTECTED]"; >$smtp = Net::SMTP -> new ("luxn.com"); >$smtp -> mail($optFrom); [snip rest of script] >What might be wrong here? > The fact that you didn't check if new() succeeded. Obviously, it did not. You need to find out why it didn't connect. Try this in place of your line with new : $smtp = Net::SMTP->new( 'luxn.com', Debug => 1 ) or die "Cannot connect: $!"; -- Csaba Ráduly, Software Engineer Sophos Anti-Virus email: [EMAIL PROTECTED] http://www.sophos.com US Support: +1 888 SOPHOS 9 UK Support: +44 1235 559933 _______________________________________________ Perl-Win32-Users mailing list [EMAIL PROTECTED] To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs