mirror of
https://github.com/django-helpdesk/django-helpdesk.git
synced 2025-06-19 17:18:23 +02:00
Fix issue 33: Port numbers not coming through as integers with certain
database backends. Thanks, simeonf.
This commit is contained in:
parent
787a727ecf
commit
9e1179606e
@ -61,10 +61,10 @@ def process_queue(q):
|
|||||||
|
|
||||||
if q.email_box_ssl:
|
if q.email_box_ssl:
|
||||||
if not q.email_box_port: q.email_box_port = 995
|
if not q.email_box_port: q.email_box_port = 995
|
||||||
server = poplib.POP3_SSL(q.email_box_host, q.email_box_port)
|
server = poplib.POP3_SSL(q.email_box_host, int(q.email_box_port))
|
||||||
else:
|
else:
|
||||||
if not q.email_box_port: q.email_box_port = 110
|
if not q.email_box_port: q.email_box_port = 110
|
||||||
server = poplib.POP3(q.email_box_host, q.email_box_port)
|
server = poplib.POP3(q.email_box_host, int(q.email_box_port))
|
||||||
|
|
||||||
server.getwelcome()
|
server.getwelcome()
|
||||||
server.user(q.email_box_user)
|
server.user(q.email_box_user)
|
||||||
@ -87,10 +87,10 @@ def process_queue(q):
|
|||||||
elif q.email_box_type == 'imap':
|
elif q.email_box_type == 'imap':
|
||||||
if q.email_box_ssl:
|
if q.email_box_ssl:
|
||||||
if not q.email_box_port: q.email_box_port = 993
|
if not q.email_box_port: q.email_box_port = 993
|
||||||
server = imaplib.IMAP4_SSL(q.email_box_host, q.email_box_port)
|
server = imaplib.IMAP4_SSL(q.email_box_host, int(q.email_box_port))
|
||||||
else:
|
else:
|
||||||
if not q.email_box_port: q.email_box_port = 143
|
if not q.email_box_port: q.email_box_port = 143
|
||||||
server = imaplib.IMAP4(q.email_box_host, q.email_box_port)
|
server = imaplib.IMAP4(q.email_box_host, int(q.email_box_port))
|
||||||
|
|
||||||
server.login(q.email_box_user, q.email_box_pass)
|
server.login(q.email_box_user, q.email_box_pass)
|
||||||
server.select(q.email_box_imap_folder)
|
server.select(q.email_box_imap_folder)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user