Never mind...figured it out. Stupid error with the # sign.
Thanks though. Alex > ---------- > From: Yuen, Alex > Sent: Wednesday, September 04, 2002 10:11 AM > To: 'Perl Beginners' > Subject: Newbie question on smtp... > > I am having problems with smtp. I am trying to do a simple test from the > documentation and can't figure out why it is not working. I get this error > message: > > Can't call method "mail" on an undefined value at windowstest_07.pl > line 10. > > Here is what I have. > > ************************************************************************** > *********************************** > #!/usr/local/bin/perl -w > > use Net::SMTP; > > # Section determines the domain name of smtp server. > # $smtp = Net::SMTP->new('mailhost'); > # print $smtp->domain,"\n"; > # $smtp->quit; > > $smtp->mail('[EMAIL PROTECTED]'); > $smtp->to('[EMAIL PROTECTED]'); > > $smtp->data(); > $smtp->datasend("To: [EMAIL PROTECTED]\n"); > $smtp->datasend("\n"); > $smtp->datasend("A simple test message\n"); > $smtp->datasend(); > > $smtp->quit; > ************************************************************************** > *********************************** > This seems simple enough, but keep getting this error message. > > Using ActivePerl version 5.6. > > Thanks. > > Alex > > > > > -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]