expee, пишу как в примере
server = smtplib.SMTP('localhost')
server.sendmail(cd['subject'], 'mutagena@gmail.com', cd['message'])
server.quit()
возникает ошибка. Вот трейсбек:
Environment:
Request Method: POST
Request URL: http://127.0.0.1:8000/contact/
Django Version: 1.1.1
Python Version: 2.6.3
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.sites',
'django.contrib.admin',
'totalcontrol.core',
'django.contrib.comments']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware')
Traceback:
File "C:\Python26\lib\site-packages\django\core\handlers\base.py" in get_response
92. response = callback(request, *callback_args, **callback_kwargs)
File "C:\Documents and Settings\Mutagena\workspace\totalcontrol\..\totalcontrol\core\views.py" in contact
144. server = smtplib.SMTP('localhost')
File "C:\Python26\lib\smtplib.py" in __init__
239. (code, msg) = self.connect(host, port)
File "C:\Python26\lib\smtplib.py" in connect
295. self.sock = self._get_socket(host, port, self.timeout)
File "C:\Python26\lib\smtplib.py" in _get_socket
273. return socket.create_connection((port, host), timeout)
File "C:\Python26\lib\socket.py" in create_connection
514. raise error, msg
Exception Type: error at /contact/
Exception Value: (10061, '\xcf\xee\xe4\xea\xeb\xfe\xf7\xe5\xed\xe8\xe5 \xed\xe5 \xf3\xf1\xf2\xe0\xed\xee\xe2\xeb\xe5\xed\xee,')