Python Django联系人表单邮件错误:协议请求不支持地址族
我在我的网站上使用Django作为联系方式 . 我提交时遇到问题Python Django联系人表单邮件错误:协议请求不支持地址族,python,django,Python,Django,我在我的网站上使用Django作为联系方式 . 我提交时遇到问题 [Errno 97] Address family not supported by protocol Request Method: POST Request URL: http://site.com/accept Django Version: 1.3.1 Exception Type: error Exception Value: [Errno 97] Address family not supported
[Errno 97] Address family not supported by protocol
Request Method: POST
Request URL: http://site.com/accept
Django Version: 1.3.1
Exception Type: error
Exception Value:
[Errno 97] Address family not supported by protocol
Exception Location: /usr/lib64/python2.6/socket.py in create_connection, line 567
Python Executable: /usr/local/bin/python
Python Version: 2.6.6
以下是我的设置:
EMAIL_HOST = 'smtp.gmail.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'myemail@gmail.com'
EMAIL_HOST_PASSWORD = 'mypassword'
EMAIL_USE_TLS = True
这似乎与您的设置无关,而是与您的服务器配置有关。有些服务与IPv6混淆(如中)。您应该尝试通过侦听IPv4地址来运行web服务器和SMTP服务器 2014年,这个问题应该得到解决,因为库和框架已经更新,应该用于操纵IPv6地址