1

因此,在尝试测试我的个人网站的电子邮件表单是否有效时,我不断收到此错误。我正在运行 Windows 8。我什至尝试在运行 Django 服务器时更改端口(python manage.py runserver 8xxx)。请帮助,我在这方面有点新!这是我的代码:

Request Method: POST
Request URL: http://localhost:8005/contact/

Django Version: 1.5.1
Python Version: 2.7.2
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin')
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware')


Traceback:
File "c:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
  115.                         response = callback(request, *callback_args, **callback_kwargs)
File "c:\Users\Aaron\Development\GitHub\mysite\mysite\views.py" in contact
  32.                 ['baldaaron6393@gmail.com'],
File "c:\Python27\lib\site-packages\django\core\mail\__init__.py" in send_mail
  62.                         connection=connection).send()
File "c:\Python27\lib\site-packages\django\core\mail\message.py" in send
  255.         return self.get_connection(fail_silently).send_messages([self])
File "c:\Python27\lib\site-packages\django\core\mail\backends\smtp.py" in send_messages
  88.             new_conn_created = self.open()
File "c:\Python27\lib\site-packages\django\core\mail\backends\smtp.py" in open
  49.                                            local_hostname=DNS_NAME.get_fqdn())
File "c:\Python27\lib\smtplib.py" in __init__
  242.             (code, msg) = self.connect(host, port)
File "c:\Python27\lib\smtplib.py" in connect
  302.         self.sock = self._get_socket(host, port, self.timeout)
File "c:\Python27\lib\smtplib.py" in _get_socket
  277.         return socket.create_connection((port, host), timeout)
File "c:\Python27\lib\socket.py" in create_connection
  571.         raise err

Exception Type: error at /contact/
Exception Value: [Errno 10013] An attempt was made to access a socket in a way forbidden by its access permissions
4

0 回答 0