Hi,

I'm using an IMAP connection in my application and want to use the
same connection across sessions to fetch the relevant data. I added
the below snippet in my settings.py file and importing connection in
my view function where I need this. However this is instantiating the
variable each time for each connection. Consequently any parallel
connections exceeding 15 start throwing errors as that is the upper
limit for gmail. Is there a way to achieve what I want in Django/
Python?

import imaplib
connection = imaplib.IMAP4_SSL('imap.gmail.com')
connection.login('useremail', 'password')

Regards,
Vamsy

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to