diff --git a/docs/configuration.rst b/docs/configuration.rst index d9a67b29..8c30b5f9 100644 --- a/docs/configuration.rst +++ b/docs/configuration.rst @@ -39,6 +39,6 @@ Before django-helpdesk will be much use, you need to do some basic configuration EMAIL_HOST_USER = 'YYYYYY@ZZZZ.PPP' EMAIL_HOST_PASSWORD = '123456' -8. If you wish to use SOCKS4/5 proxy with Helpdesk Queue email operations, install PySocks manually. +8. If you wish to use SOCKS4/5 proxy with Helpdesk Queue email operations, install PySocks manually. Please note that mixing both SOCKS and non-SOCKS email sources for different queues is only supported under Python 2; on Python 3, SOCKS proxy support is all-or-nothing: either all queue email sources must use SOCKS or none may use it. If you need this functionality on Python 3 please `let us know `_. You're now up and running! Happy ticketing. diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 0bf4c0a3..90916a72 100644 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -126,12 +126,8 @@ def process_queue(q, logger): addr=q.socks_proxy_host, port=q.socks_proxy_port) socket.socket = socks.socksocket - else: - if six.PY2: - socket.socket = socket._socketobject - elif six.PY3: - import _socket - socket.socket = _socket.socket + elif six.PY2: + socket.socket = socket._socketobject email_box_type = settings.QUEUE_EMAIL_BOX_TYPE or q.email_box_type