-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
SortCriteria to consts, __str__ to MailMessage, docs info
- Loading branch information
Showing
9 changed files
with
71 additions
and
73 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,6 +24,17 @@ | |
msg.subject - email subject, utf8 str | ||
msg.text - email plain text content, utf8 str | ||
msg.html - email html content, utf8 str | ||
Mailbox classes: | ||
MailBox - for a normal encrypted connection. This is what most email servers use these days, aka IMAPS (imap with SSL/TLS) | ||
MailBoxTls - For a STARTTLS connection: this creates a plaintext connection then upgrades | ||
it later by using a STARTTLS command in the protocol. The internet has mostly gone to the "always encrypted" | ||
rather than "upgrade" paradigm, so this is not the class to use. | ||
MailBoxUnencrypted - Standard IMAP without SSL/TLS. You should not use this on the public internet. | ||
MailBox corresponds to imaplib.IMAP4_SSL; | ||
MailBoxTls corresponds to imaplib.IMAP4, then using startls() on the resulting connection; | ||
MailboxUnencrypted corresponds to imaplib.IMAP4 with no security applied. | ||
""" | ||
with MailBox('imap.mail.com').login('[email protected]', 'pwd') as mailbox: | ||
for msg in mailbox.fetch(): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,9 +2,8 @@ | |
|
||
from tests.utils import MailboxTestCase, TEST_MAILBOX_NAME_SET, get_test_mailbox | ||
from imap_tools.errors import MailboxCopyError | ||
from imap_tools.consts import MailMessageFlags | ||
from imap_tools.consts import MailMessageFlags, SortCriteria | ||
from imap_tools.query import A | ||
from imap_tools.utils import SortCriteria | ||
|
||
TEST_MESSAGE_DATA = b'From: Mikel <[email protected]>\nTo: Mikel <[email protected]>\nContent-Type: text/plain; charset=US-ASCII; format=flowed\nContent-Transfer-Encoding: 7bit\nMime-Version: 1.0 (Apple Message framework v929.2)\nSubject: _append_\nDate: Sat, 22 Nov 2008 11:04:59 +1100\n\nPlain email.\n' # noqa | ||
|
||
|