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(s ocket.PF_INET, socket.SOCK_STR EAM)
NameError: name 'socket' is not defined
the code is:
#!/usr/bin/python
sock = socket.socket(s ocket.PF_INET, socket.SOCK_STR EAM)
sock.connect((" mail.oasd.k12.w i.us", 25))
sock.send("HELO ")
print sock.recv(8192)
sock.close()
Traceback (most recent call last):
File "./mailer", line 3, in ?
sock = socket.socket(s ocket.PF_INET, socket.SOCK_STR EAM)
NameError: name 'socket' is not defined
the code is:
#!/usr/bin/python
sock = socket.socket(s ocket.PF_INET, socket.SOCK_STR EAM)
sock.connect((" mail.oasd.k12.w i.us", 25))
sock.send("HELO ")
print sock.recv(8192)
sock.close()
Comment