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.
In reply to Re: Socket SMTP email inappropriate i/o control operation
by Corion
in thread Socket SMTP email inappropriate i/o control operation
by $h4X4_|=73}{
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |