Hey,
I'm trying to use the SMTP protocol via python to make a program so that I can mail every student his own marks only (I'll use an excel file to store marks, and I can't send the entire excel sheet because of privacy reason.. plus this gives me something to productively kill time with while learning someting.. )
Anyway.. I'm hitting the following error (I typed this in Windows, IDLE, python 2.6.2)
I checked the python sites for this, namely : 10. Brief Tour of the Standard Library — Python v2.6.4 documentation
It says that : " (Note that the second example needs a mailserver running on localhost.)" Where the second example is essentially starting with the code I've given above.
How do I "Run a mailserver on localhost" ?? Trying out net connectivity from programs for the first time.. :huh:
I googled it, it gave some VERY weird solutions, except one that said use the Internet Information Services (IISadmin) :huh::huh::huh:
No idea how to open this, though...
:huh::huh::huh:
I'm trying to use the SMTP protocol via python to make a program so that I can mail every student his own marks only (I'll use an excel file to store marks, and I can't send the entire excel sheet because of privacy reason.. plus this gives me something to productively kill time with while learning someting.. )
Anyway.. I'm hitting the following error (I typed this in Windows, IDLE, python 2.6.2)
Code:
>>> from smtplib import *
>>> s = SMTP('localhost',25)
Traceback (most recent call last):
File "<pyshell#10>", line 1, in <module>
s = SMTP('localhost',25)
File "C:\Python26\lib\smtplib.py", line 239, in __init__
(code, msg) = self.connect(host, port)
File "C:\Python26\lib\smtplib.py", line 295, in connect
self.sock = self._get_socket(host, port, self.timeout)
File "C:\Python26\lib\smtplib.py", line 273, in _get_socket
return socket.create_connection((port, host), timeout)
File "C:\Python26\lib\socket.py", line 512, in create_connection
raise error, msg
error: [Errno 10061] No connection could be made because the target machine actively refused it
I checked the python sites for this, namely : 10. Brief Tour of the Standard Library — Python v2.6.4 documentation
It says that : " (Note that the second example needs a mailserver running on localhost.)" Where the second example is essentially starting with the code I've given above.
How do I "Run a mailserver on localhost" ?? Trying out net connectivity from programs for the first time.. :huh:
I googled it, it gave some VERY weird solutions, except one that said use the Internet Information Services (IISadmin) :huh::huh::huh:
No idea how to open this, though...
:huh::huh::huh: