-
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.
- Loading branch information
Showing
6 changed files
with
62 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -11,4 +11,4 @@ | |
from .utils import EmailAddress | ||
from .errors import * | ||
|
||
__version__ = '1.7.3' | ||
__version__ = '1.7.4' |
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
21 changes: 21 additions & 0 deletions
21
tests/messages/plain_emails/raw_email_with_partially_quoted_content_id.eml
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 |
---|---|---|
@@ -0,0 +1,21 @@ | ||
From: [email protected] | ||
To: [email protected] | ||
Subject: Пример email с вложением и Content-ID | ||
MIME-Version: 1.0 | ||
Content-Type: multipart/mixed; boundary="boundary123" | ||
|
||
--boundary123 | ||
Content-Type: text/plain; charset="UTF-8" | ||
Content-Transfer-Encoding: 7bit | ||
текстовое сообщение с вложением, у которого есть Content-ID. | ||
--boundary123 | ||
Content-Type: image/png; name="example.png" | ||
Content-Transfer-Encoding: base64 | ||
Content-Disposition: attachment; filename="example.png" | ||
Content-ID: Test0 =?UTF-8?B?Iua8ouWtlyI=?= mid1 =?UTF-8?B?Iua8ouWtlyI=?= tail2 | ||
iVBORw0KGgoAAAANSUhEUgAAAAUA | ||
AAAAFQAAABN3x3XAAAAAElFTkSuQmCC | ||
--boundary123-- |
30 changes: 30 additions & 0 deletions
30
tests/messages_data/plain_emails/raw_email_with_partially_quoted_content_id.py
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 |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import datetime | ||
from imap_tools import EmailAddress | ||
|
||
DATA = dict( | ||
subject='Пример email с вложением и Content-ID', | ||
from_='[email protected]', | ||
to=('[email protected]',), | ||
cc=(), | ||
bcc=(), | ||
reply_to=(), | ||
date=datetime.datetime(1900, 1, 1, 0, 0), | ||
date_str='', | ||
text='текстовое сообщение с вложением, у которого есть Content-ID.\r\n', | ||
html='', | ||
headers={'from': ('[email protected]',), 'to': ('[email protected]',), 'subject': ('\udcd0\udc9f\udcd1\udc80\udcd0\udcb8\udcd0\udcbc\udcd0\udcb5\udcd1\udc80 email \udcd1\udc81 \udcd0\udcb2\udcd0\udcbb\udcd0\udcbe\udcd0\udcb6\udcd0\udcb5\udcd0\udcbd\udcd0\udcb8\udcd0\udcb5\udcd0\udcbc \udcd0\udcb8 Content-ID',), 'mime-version': ('1.0',), 'content-type': ('multipart/mixed; boundary="boundary123"',)}, | ||
attachments=[ | ||
dict( | ||
filename='example.png', | ||
content_id='Test0 "漢字" mid1 "漢字" tail2', | ||
content_disposition='attachment', | ||
content_type='image/png', | ||
payload=b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x05\x00\x00\x00\x00\x15\x00\x00\x00\x13w\xc7u\xc0\x00\x00\x00\x12QS\x91+\x90\x98 ', | ||
), | ||
], | ||
from_values=EmailAddress(name='', email='[email protected]'), | ||
to_values=(EmailAddress(name='', email='[email protected]'),), | ||
cc_values=(), | ||
bcc_values=(), | ||
reply_to_values=(), | ||
) |