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]

Reply via email to