CGI/Perl Guide | Learning Center | Forums | Advertise | Login
Site Search: in

  Main Index MAIN
INDEX
Search Posts SEARCH
POSTS
Who's Online WHO'S
ONLINE
Log in LOG
IN

Home: Need a Custom or Prewritten Perl Program?: I Need a Programmer for Freelance Work:
Reply to: Re: nt 200 server help
 
Subject:
Guest Username:
E-mail address:
Post Style:      Get Markup Help
Icon:
none









Post:




Replying to: Re: nt 200 server help by mhx
Post: Please post your code.
It's nice to see $SMTPMailServer is set to something, but the question was if $smtp was initialized correctly. The error you got

In Reply To
Can't call method "mail" on an undefined value at C:\Inetpub\wwwroot\cgi-bin\statpac.pl line 84.

Line 84 is $smtp->mail($from);

refers to the $smtp object. It seems that $smtp has either not been initialized at all or the initialization went wrong. Net::SMTP states that failure of a method call (such as new) is indicated by returning an undefined or empty list value. In case of the constructor, this would mean that $smtp would have been assigned an undefined value instead of a blessed object reference. Looking at the source of Net::SMTP::new, I can see a lot of reasons why the constructor could return undef.
But without seeing your code, all this is pure speculation.

-- Marcus


Code
s$$ab21b8d15c3d97bd6317286d$;$"=547269736;split'i',join$,,map{chr(($*+= 
($">>=1)&1?-hex:hex)+0140)}/./g;$"=chr$";s;.;\u$&;for@_[0,2];print"@_,"



Search for (options) Powered by Gossamer Forum v.1.2.0

Web Applications & Managed Hosting Powered by Gossamer Threads
Visit our Mailing List Archives