Hi,
I am trying to use python module smtplib to send my email out on
window xp (localhost).
import smtplib
server = smtplib.SMTP('l ocalhost')
but I got the error information as follows:
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
File "c:\python24\li b\smtplib.py", line 244, in __init__
(code, msg) = self.connect(ho st, port)
File "c:\python24\li b\smtplib.py", line 311, in connect
(code, msg) = self.getreply()
File "c:\python24\li b\smtplib.py", line 355, in getreply
raise SMTPServerDisco nnected("Connec tion unexpectedly closed")
SMTPServerDisco nnected: Connection unexpectedly closed
I am not sure what is wrong with it. Should I configure my window xp
somewhere to run smtplib.SMTP('l ocalhost')?
Thanks in advance.
ouyang
I am trying to use python module smtplib to send my email out on
window xp (localhost).
import smtplib
server = smtplib.SMTP('l ocalhost')
but I got the error information as follows:
Traceback (most recent call last):
File "<interacti ve input>", line 1, in ?
File "c:\python24\li b\smtplib.py", line 244, in __init__
(code, msg) = self.connect(ho st, port)
File "c:\python24\li b\smtplib.py", line 311, in connect
(code, msg) = self.getreply()
File "c:\python24\li b\smtplib.py", line 355, in getreply
raise SMTPServerDisco nnected("Connec tion unexpectedly closed")
SMTPServerDisco nnected: Connection unexpectedly closed
I am not sure what is wrong with it. Should I configure my window xp
somewhere to run smtplib.SMTP('l ocalhost')?
Thanks in advance.
ouyang
Comment