When I try to open a socket with python i get the following error: Traceback (most recent call last): File "./mailer", line 3, in ? sock = socket.socket(socket.PF_INET, socket.SOCK_STREAM) NameError: name 'socket' is not defined
the code is: #!/usr/bin/python sock = socket.socket(socket.PF_INET, socket.SOCK_STREAM) sock.connect(("mail.oasd.k12.wi.us", 25)) sock.send("HELO") print sock.recv(8192) sock.close() -- http://mail.python.org/mailman/listinfo/python-list