on Thu, 23 May 2002 09:18:25 GMT, [EMAIL PROTECTED] (Harry
Jackson) wrote: 

>> From: Michael Kelly [mailto:[EMAIL PROTECTED]]
>> 
>> <code>
>> #!/usr/bin/perl
>> 
>> use Net::SMTP;
>> 
>> $server     = 'your-smtp-server';
>> $to         = '[EMAIL PROTECTED]';
>> $from_name  = 'You';
>> $from_email = '[EMAIL PROTECTED]';
>> $subject    = 'hello, email';
>> 
>> $smtp = Net::SMTP->new($server);
>> $smtp->mail($from_email);
> 
> 
> I have tried the above code and got no joy whatsoever. I am
> getting the error 
> 
> 
> Can't call method "mail" on an undefined value at
> H:\Perl\testing\mail.pl line 13.

There is no line 13 in the above code.
Why don't you check the return value of the Net::SMTP call, as in:

$smtp = NET::SMTP->new($server) or die "SMTP failed: $!";

-- 
felix

-- 
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to