mirror of
https://github.com/coddingtonbear/django-mailbox.git
synced 2026-07-09 22:38:19 +02:00
Fix text content with text attachment (#170)
* Add tests case for text content with text attachment * Fix parsing text message with text attachment
This commit is contained in:
parent
dfad0f8f9c
commit
7eecb0d41d
2 changed files with 4 additions and 1 deletions
|
|
@ -108,6 +108,8 @@ def get_body_from_message(message, maintype, subtype):
|
|||
"""
|
||||
body = six.text_type('')
|
||||
for part in message.walk():
|
||||
if part.get('content-disposition', '').startswith('attachment;'):
|
||||
continue
|
||||
if part.get_content_maintype() == maintype and \
|
||||
part.get_content_subtype() == subtype:
|
||||
charset = part.get_content_charset()
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue