http://www.perlmonks.org?node_id=595387


in reply to Send email on Windows Server

You can connect to an SMTP server to send mails using modules such as Net::SMTP, Mail::Mailer::smtp, or Mail::Transport::SMTP.

The SMTP server can be on the same Windows box or can be on any other server that you can access and that allows you to send mail. I believe that Windows 2000 Server comes with bundled SMTP software. Your company almost certainly has an SMTP server that, with the proper security configuration, you can use.

You do have to handle the possibility that the SMTP server is not working/reachable when you try to send mail. If the server is on the same box, this is less likely (no network issues), but of course can still happen. Depending on your application, you can handle this either before or after the mail is generated. E.g. if you're generating the mail from a database of addresses, you can just regenerate from the database rather than saving the generated emails for retry. (Avoid sending duplicates, of course.) If you're sending emails based on, say events on a web server, it's a little more problematic.