From eb74f807d81e483e1080834c699d0965989dcb0d Mon Sep 17 00:00:00 2001 From: tschmidt Date: Mon, 16 Jan 2012 17:36:24 -0800 Subject: [PATCH] added QUEUE_EMAIL_BOX_SSL --- helpdesk/management/commands/get_email.py | 4 ++-- helpdesk/settings.py | 1 + 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/helpdesk/management/commands/get_email.py b/helpdesk/management/commands/get_email.py index 141683d3..f9d69a09 100644 --- a/helpdesk/management/commands/get_email.py +++ b/helpdesk/management/commands/get_email.py @@ -81,7 +81,7 @@ def process_queue(q, quiet=False): if email_box_type == 'pop3': - if q.email_box_ssl: + if q.email_box_ssl or settings.QUEUE_EMAIL_BOX_SSL: if not q.email_box_port: q.email_box_port = 995 server = poplib.POP3_SSL(q.email_box_host or settings.QUEUE_EMAIL_BOX_HOST, int(q.email_box_port)) else: @@ -108,7 +108,7 @@ def process_queue(q, quiet=False): server.quit() elif email_box_type == 'imap': - if q.email_box_ssl: + if q.email_box_ssl or settings.QUEUE_EMAIL_BOX_SSL: if not q.email_box_port: q.email_box_port = 993 server = imaplib.IMAP4_SSL(q.email_box_host or settings.QUEUE_EMAIL_BOX_HOST, int(q.email_box_port)) else: diff --git a/helpdesk/settings.py b/helpdesk/settings.py index 9fb46bb5..77a243c4 100644 --- a/helpdesk/settings.py +++ b/helpdesk/settings.py @@ -127,6 +127,7 @@ HELPDESK_FOOTER_SHOW_CHANGE_LANGUAGE_LINK = getattr(settings, 'HELPDESK_FOOTER_S ''' email options ''' # default Queue email submission settings QUEUE_EMAIL_BOX_TYPE = getattr(settings, 'QUEUE_EMAIL_BOX_TYPE', None) +QUEUE_EMAIL_BOX_SSL = getattr(settings, 'QUEUE_EMAIL_BOX_SSL', None) QUEUE_EMAIL_BOX_HOST = getattr(settings, 'QUEUE_EMAIL_BOX_HOST', None) QUEUE_EMAIL_BOX_USER = getattr(settings, 'QUEUE_EMAIL_BOX_USER', None) QUEUE_EMAIL_BOX_PASSWORD = getattr(settings, 'QUEUE_EMAIL_BOX_PASSWORD', None)