in reply to Socket SMTP email inappropriate i/o control operation

You haven't binmode'd your socket, so I wonder how this works under Unix, and on Windows instead of sending \n you'll send \r\n to the socket.

For better debugging, consider printing the server answer in $_.

Have you considered simply using MIME::Lite instead? It works on Windows and systems with sendmail available and has been tested.

Replies are listed 'Best First'.
Re^2: Socket SMTP email inappropriate i/o control operation
by $h4X4_|=73}{ (Monk) on Aug 05, 2016 at 15:10 UTC

    The value of $_ is 421 4.4.2 service timed out.
    I tried binmode in many places on S and STDOUT, but maybe I didn't use it correctly.
    I thought it maybe windows firewall so I turned that off, but it still does the same thing.
    The better/faster way would be to use a module, so I will probably do that when I have more time to play with it.