File tree Expand file tree Collapse file tree 1 file changed +10
-3
lines changed
django_mailbox/transports Expand file tree Collapse file tree 1 file changed +10
-3
lines changed Original file line number Diff line number Diff line change 1
- from imaplib import IMAP4 , IMAP4_SSL
1
+ import imaplib
2
2
import logging
3
3
4
4
from django .conf import settings
5
5
6
6
from .base import EmailTransport , MessageParseError
7
7
8
8
9
+ # By default, imaplib will raise an exception if it encounters more
10
+ # than 10k bytes; sometimes users attempt to consume mailboxes that
11
+ # have a more, and modern computers are skookum-enough to handle just
12
+ # a *few* more messages without causing any sort of problem.
13
+ imaplib ._MAXLINE = 1000000
14
+
15
+
9
16
logger = logging .getLogger (__name__ )
10
17
11
18
@@ -28,11 +35,11 @@ def __init__(
28
35
self .archive = archive
29
36
self .folder = folder
30
37
if ssl :
31
- self .transport = IMAP4_SSL
38
+ self .transport = imaplib . IMAP4_SSL
32
39
if not self .port :
33
40
self .port = 993
34
41
else :
35
- self .transport = IMAP4
42
+ self .transport = imaplib . IMAP4
36
43
if not self .port :
37
44
self .port = 143
38
45
You can’t perform that action at this time.
0 commit comments