in reply to Net::SMTP->new call hangs

It sounds like you are on a Windows machine.

Did you recently install XP service pack 2 ?

The firewall enabled by SP2 may be blocking access to your SMTP server.

Try the command
NETSTAT -a
from a command line while your program is hung - see if it is waiting on port 25.

Another, more drastic diagnostic is to sniff the network for packets, using something like Ethereal.

    ...each is assigned his own private delusion but he cannot see the baggage on his own back.

Replies are listed 'Best First'.
Re^2: Net::SMTP->new call hangs
by gpurusho (Acolyte) on Dec 08, 2004 at 22:13 UTC
    We are on Windows 2000.

    Also sniffing the network might not be possible as I need to go through a lot of approval process and paperwork before this can even begin.
      Without more info, the only suggestion I have is to try to run your script in DEBUG mode, by doing

      perl -d ScriptName.pl

      Debug mode commands are documented in perldebug and perldebtut.

          ...each is assigned his own private delusion but he cannot see the baggage on his own back.

        What other information would help you help me. I tried running the script on a debug mode and it hangs in the Perl - SMTP module.

        Also I made sure the port 25 is open and no other application or firewall is blocking it.