-
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.
MailAttachment.filename parse non-ascii filename
- Loading branch information
Showing
6 changed files
with
42 additions
and
7 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -59,7 +59,7 @@ MailBox, MailBoxTls, MailBoxUnencrypted - for create mailbox client. `TLS exampl | |
|
||
BaseMailBox.<auth> - login, login_utf8, xoauth2, logout - authentication functions, they support context manager. | ||
|
||
BaseMailBox.fetch - first searches email nums by criteria in current folder, then fetch and yields `MailMessage <#email-attributes>`_: | ||
BaseMailBox.fetch - first searches email uids by criteria in current folder, then fetch and yields `MailMessage <#email-attributes>`_, args: | ||
|
||
* *criteria* = 'ALL', message search criteria, `query builder <#search-criteria>`_ | ||
* *charset* = 'US-ASCII', indicates charset of the strings that appear in the search criteria. See rfc2978 | ||
|
@@ -69,7 +69,7 @@ BaseMailBox.fetch - first searches email nums by criteria in current folder, the | |
* *headers_only* = False, get only email headers (without text, html, attachments) | ||
* *bulk* = False, False - fetch each message separately per N commands - low memory consumption, slow; True - fetch all messages per 1 command - high memory consumption, fast | ||
|
||
BaseMailBox.uids - search mailbox for matching message uids in current folder, returns [str] | ||
BaseMailBox.uids - search mailbox for matching message uids in current folder, returns [str | None], None when MailMessage.from_bytes used, args: | ||
|
||
* *criteria* = 'ALL', message search criteria, `query builder <#search-criteria>`_ | ||
* *charset* = 'US-ASCII', indicates charset of the strings that appear in the search criteria. See rfc2978 | ||
|
@@ -92,7 +92,7 @@ MailMessage and MailAttachment public attributes are cached by functools.lru_cac | |
.. code-block:: python | ||
for msg in mailbox.fetch(): # generator: imap_tools.MailMessage | ||
msg.uid # str: '123' | ||
msg.uid # str | None: '123' | ||
msg.subject # str: 'some subject 你 привет' | ||
msg.from_ # str: 'Bartö[email protected]' | ||
msg.to # tuple: ('[email protected]', '[email protected]', ) | ||
|
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 |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
from .utils import EmailAddress | ||
from .errors import * | ||
|
||
__version__ = '1.4.0' | ||
__version__ = '1.5.0' |
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 |
---|---|---|
|
@@ -15,7 +15,7 @@ | |
headers={'mime-version': ('1.0 (Apple Message framework v730)',), 'content-type': ('multipart/mixed; boundary=Apple-Mail-13-196941151',), 'message-id': ('<[email protected]>',), 'from': ('[email protected]',), 'subject': ('testing',), 'date': ('Mon, 6 Jun 2005 22:21:22 +0200',), 'to': ('[email protected]',)}, | ||
attachments=[ | ||
dict( | ||
filename='ci��le.txt', | ||
filename='ciële.txt', | ||
content_id='', | ||
content_disposition='attachment', | ||
content_type='text/plain', | ||
|