----- Original Message ----- 
From: "khozaima shakir" <[EMAIL PROTECTED]>
To: <perl-win32-users@listserv.ActiveState.com>
Sent: Saturday, November 04, 2006 7:43 AM
Subject: Newbie: email from perl script

.
.
> .... get follwing error :Can't call method "mail" on an undefined value

>                                $smtp = Net::SMTP->new('here.com');
                                   die "Could not open connection: $!" if (!
defined $smtp);
>                                $smtp->mail( '[EMAIL PROTECTED]' );


The error implies that $smtp is "an undefined value" - which will mean that
"$smtp = Net::SMTP->new('here.com');" failed - most likely because there is
no such server as 'here.com' (or whatever it was that you specified as the
mail server).

I suggest you insert the line of code as per the above.

Cheers,
Rob

_______________________________________________
Perl-Win32-Users mailing list
Perl-Win32-Users@listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs

Reply via email to