B
- Bob -
I ran into the following error when trying to run a program using
Net::smtp on a server at conversent.net. I think this is some sort of
a configuration error on their part but I don't know enough about Perl
and Unix to tell. I do know that the same program runs on other
similar servers without any problem.
I'd be interested in whether this is something I can hack a fix to
myself or if I am required to have the systems people correct it.
Thanks,
Error output and program snipit follow:
---------------------------------------------------------------------
Technical data v:: Can't locate Net/SMTP.pm in @INC (@INC contains:
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int
/usr/perl5/site_perl/5.6.1 /usr/perl5/site_perl
/usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at
/webhome/s/mydomain.com/public_html/cgi-bin/myProgram.pl line 95.
BEGIN failed--compilation aborted at
/webhome/s/mydomain.com/public_html/cgi-bin/myprogram.pl line 95.
---------------------------------------------------------------------
#Program
---------------------------------------------------------------------
# start program
#!/usr/bin/perl -w
use strict;
use CGI qw
all);
use CGI::Carp qw(fatalsToBrowser warningsToBrowser set_message);
# lots of code
sub send_email{
my($to, $from, $subject, $body)=@_;
use Net::SMTP;
my $relay="smtp.mydomain.net";
my $smtp = Net::SMTP->new($relay);
die "Could not open connection: $!" if (! defined $smtp);
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend("To: $to\n");
$smtp->datasend("From: $from\n");
$smtp->datasend("Subject: $subject\n");
$smtp->datasend("\n");
$smtp->datasend("$body\n");
$smtp->dataend();
$smtp->quit;
}
# end program
Net::smtp on a server at conversent.net. I think this is some sort of
a configuration error on their part but I don't know enough about Perl
and Unix to tell. I do know that the same program runs on other
similar servers without any problem.
I'd be interested in whether this is something I can hack a fix to
myself or if I am required to have the systems people correct it.
Thanks,
Error output and program snipit follow:
---------------------------------------------------------------------
Technical data v:: Can't locate Net/SMTP.pm in @INC (@INC contains:
/usr/perl5/5.6.1/lib/sun4-solaris-64int /usr/perl5/5.6.1/lib
/usr/perl5/site_perl/5.6.1/sun4-solaris-64int
/usr/perl5/site_perl/5.6.1 /usr/perl5/site_perl
/usr/perl5/vendor_perl/5.6.1/sun4-solaris-64int
/usr/perl5/vendor_perl/5.6.1 /usr/perl5/vendor_perl .) at
/webhome/s/mydomain.com/public_html/cgi-bin/myProgram.pl line 95.
BEGIN failed--compilation aborted at
/webhome/s/mydomain.com/public_html/cgi-bin/myprogram.pl line 95.
---------------------------------------------------------------------
#Program
---------------------------------------------------------------------
# start program
#!/usr/bin/perl -w
use strict;
use CGI qw
use CGI::Carp qw(fatalsToBrowser warningsToBrowser set_message);
# lots of code
sub send_email{
my($to, $from, $subject, $body)=@_;
use Net::SMTP;
my $relay="smtp.mydomain.net";
my $smtp = Net::SMTP->new($relay);
die "Could not open connection: $!" if (! defined $smtp);
$smtp->mail($from);
$smtp->to($to);
$smtp->data();
$smtp->datasend("To: $to\n");
$smtp->datasend("From: $from\n");
$smtp->datasend("Subject: $subject\n");
$smtp->datasend("\n");
$smtp->datasend("$body\n");
$smtp->dataend();
$smtp->quit;
}
# end program