Hi Just use "shaw" instead of "shaw.ca" as in :
$smtp = Net::SMTP->new('shaw')||die("my woes are never ending :("); You are supposed to use only the name of the mail server. shaw.ca is an invalid argument to Net::SMTP as you will find if you use : print "$!"; after trying to connect to the server as you do. Bon Mailing :) -aman. -----Original Message----- From: Tin-Shan Chau [mailto:tchau@;shaw.ca] Sent: Wednesday, November 13, 2002 7:37 AM To: Timothy Johnson; 'Kipp, James'; 'Help on PERL' Subject: Re: Sending mail under Windows 95/2000 I did find out that the problem is with: $smtp = Net::SMTP->new('shaw.ca'); by adding "or die...". However, I am able to send e-mail to myself using MS Access. Any other idea what my problem might be? Thanks. ----- Original Message ----- From: "Timothy Johnson" <[EMAIL PROTECTED]> To: "'Kipp, James'" <[EMAIL PROTECTED]>; "'Tin-Shan Chau'" <[EMAIL PROTECTED]>; "'Help on PERL'" <[EMAIL PROTECTED]> Sent: Monday, November 11, 2002 12:26 PM Subject: RE: Sending mail under Windows 95/2000 > > Make sure that your sysadmin is allowing internal clients to connect to the > mail server via SMTP. You might be set up on Exchange, in which case you > might not be using SMTP to connect. > > -----Original Message----- > From: Kipp, James [mailto:James.Kipp@;mbna.com] > Sent: Monday, November 11, 2002 12:16 PM > To: 'Tin-Shan Chau'; 'Help on PERL' > Subject: RE: Sending mail under Windows 95/2000 > > > > $smtp = Net::SMTP->new('shaw.ca'); # connect to an > > SMTP server > > > $smtp->mail( '[EMAIL PROTECTED]' ); # use the sender's > > > address here > > > $smtp->to('[EMAIL PROTECTED]'); # recipient's address > > > $smtp->data(); # Start the mail > > > > > > connection > > > >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> > > > It kept giving me "Can't call method 'mail' on an undefined > > > value at test1.pl line 4" > > > > > > Does anyone have any idea how to fix this? Or has anyone had > > > a successful experience doing what I am trying to do? > > > > > > Thanks. > > > > > > > try using $smtp->recipient instead of mail() > > woops, scratch that. i misread something. > try a die statement when you intialize the ojbect > $smtp = Net::SMTP->new('shaw.ca') or die "blah, blah"; # connect > # looks like you may not be connecting > > > > > -- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] -- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]