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.