Net::SMTP problem

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

 have a simple few lines of Perl I'm trying to run from a cgi program
to send some email.

My code looks like:
use Net::SMTP;
my $email="mda\";
my $msg="hello tst\n";
        $smtp = Net::SMTP->new('');# or die "Unable to open
the connection";

When I run the code via command line it works. When I run it via a cgi
program from a webpage I get when it dies on the SMTP->new line:
Can't call method "mail" on an undefined value

Everything I"ve searched for says it is because my script cannot
contact the smtp server, but that's not the case because when I run it
via the command line, it works fine.

It looks like it has to be some permisssion thing, either in sendmail
or apache.

Any thoughts?


Site Timeline