|more useful options|
(jcwren) Re: Sending mail on NTby jcwren (Prior)
|on Jul 20, 2000 at 01:12 UTC||Need Help??|
Net::SMTP works fine on my NT servers. You can check if they're installed on your server by doing ths following:
If you get an error to the effect that it can't find them, then they're indeed not installed. However, that shouldn't stop you from installing them. Since most NT systems really aren't setup for security (like Linux boxes), you could just hop on over to CPAN and fetch them. I think the Net::SMTP is a pure Perl module, so you shouldn't need a compiler to install it. You may have to grab a copy of make, nmake or dmake from somwhere however.
Net::SMTP is not reliant on any underlying O/S programs, such as sendmail. It basically uses sockets to connect to the mail server. Which, incidently, could be your problem. You'll need the DNS entry or IP address of a mail server that supports SMTP, or it won't be able to send mail. If your business is running Exchange, it can easily be configured to support SMTP. A couple of settings in the admin program will set it up.
Here's even some sample code to talk to the SMTP server (I've changed the address to 127.0.0.1, you'll need to use yours)
This subroutine is a direct extract from some code around here. I also just tested this code, so it should work for you, if you fix the mail server address.
Update: I just noticed where you said you can't install modules. Is that because you're not permitted to, or because you don't believe you can since you're not a system administrator? If it's a case of the latter, CPAN modules can be installed into a users directory, as opposed to the system directories. If it's because they won't permit you, you can always hack the code out of Net::SMTP and include it in your script, or treat it as a module (doable, but not the wisest way.)