in reply to Issue with Socket creation

Line endings in SMTP are \x0D\x0A, and you're sending only \n (assuming that you are on Unix).

Is there any reason you are not using one of the SMTP modules?

I'm also not sure what the SMTP spec says about repeated HELO commands.

Have you used a network sniffer to check what actually goes over the wire? Maybe the remote end closed the connection or simply stops talking to you if you behave in a way that does not conform to the SMTP spec. Is there an error log at the remote end that you can inspect?

Replies are listed 'Best First'.
Re^2: Issue with Socket creation
by kprasanna_79 (Hermit) on Jul 01, 2014 at 19:08 UTC
    Thanks corion a lot for your time

    I am using this in Unix server and this code was already running fine in the old HP UX server. We migrated to a new server but same flavor. Thats the only change recently happened and this is not working. This IO::Socket module was already used in the code and so i didnt distrub it. Would you please advise us on the network sniffing?

    -Prasanna.K

      Would you please advise us on the network sniffing?

      Take a look at Wireshark. Tips on how to use it are probably beyond the scope of the Monastery, but it's fairly self-explanatory anyway.