I don't think you were able to use non-ssl sockets to retrieve Gmail, as its POP3 is SSL, unless of course you sniffed the packets with an exernal http(s) sniffer, to retrieve your specific cookie for your inbox, and simulated a webbrowser.
There is a way without having to have an external program installed, with COM+sockets which is illustrated in my
Gmail Checker.
What my addon does is automate this cookie retrieval process with the use of COM.
If I wouldn't have broken my shoulder I would have updated the Gmail Checker by now to expand it with reading capabilities, as the relevant code is working, but I'm in too much pain right now to finish it up, and typing/scripting with one hand completely sux.