gpurusho has asked for the wisdom of the Perl Monks concerning the following question:

All,
I have a script that makes a SMTP call as follows

Net::SMTP->new($server);

I recently had a lot of spyware on my machine which I removed using "Ad-aware" a spyware tool. Ever since then teh SMTP call hangs. Can someone help me on how to debug this issue? IS there any other way I can solve the problem?

Thanks, Ganesh

Replies are listed 'Best First'.
Re: Net::SMTP->new call hangs
by NetWallah (Canon) on Dec 08, 2004 at 01:12 UTC
    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.

      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.