
icemann
Deleted
May 4, 2000, 8:43 AM
Post #3 of 5
(297 views)
|
Well, I'm able to get around the syntax errors using a different approach I found in another posting on this site, but now it seems that the SMTP object can't find its constructor method, even though I can see it in the library. I just picked up Perl, so this could very easily be something simple. Also, our WebSite is hosted on an NT machine, which might cause some compatibilty issues with the Compiler/Interpretor. Thanks for the help. ***SCRIPT CODE*** use Net::SMTP; #require "cgi-lib.pl"; #The strings below which refer to corporate #URLs were replaced for the purpose of #posting. $smtp_server="mymailserver.com"; $domain_name="mydomain.com"; @to=$input{'to'}; $from=$input{'from'}; $subject=$input{'subject'}; $body=$input{'body'}; $smtp=Net::SMTP->new($smtp_server, Hello=>$domain_name, Timeout=>30, Debut=>1, ); $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("$body\n"); $smtp->dataend(); $smtp->quit; print qq~ TO: $to FROM: $from SUBJECT: $subject $body ~; exit; ***RESULTS USING IE 5.0*** CGI Error The specified CGI application misbehaved by not returning a complete set of HTTP headers. The headers it did return are: Can't locate object method "new" via package "Net::SMTP" at D:\test_sites\test
|