1
0
Fork 1
mirror of https://github.com/coddingtonbear/django-mailbox.git synced 2026-07-09 22:38:19 +02:00
django-mailbox/django_mailbox/tests/message_with_attachment.eml
Adam Coddington 5f289289ce Major refactor of message attachment handling; no longer stores verbatim
message copy in database.

Bumping version number to 2.1

* Walks through incoming message, write attachments to disk as they are found,
  and alters message body removing actual attachment body, and adding
  header 'X-Django-Mailbox-Interpolate-Attachment' referencing the ID of the
  stored attachment.
* When calling ``get_email_object``, will walk through stored message, and
  're-hydrate' the message by finding said headers, searching for the
  appropriate record in the MessageAttachments table, and rebuild the message
  object as closely as possible.

Minor fixes:

* Properly collect text/plain content from any part of the message; previously
  would only check the message's first level of payloads, now walks through
  all payloads, building a string of all text/plain content.
* Remove use of deprecated `assertEquals` message.
2013-06-23 20:27:50 -07:00

29 lines
1.1 KiB
Text

MIME-Version: 1.0
Received: by 10.221.0.211 with HTTP; Sun, 20 Jan 2013 12:07:07 -0800 (PST)
X-Originating-IP: [24.22.122.177]
Date: Sun, 20 Jan 2013 12:07:07 -0800
Delivered-To: test@adamcoddington.net
Message-ID: <CAMdmm+jYCgrxrekAxszmDnBjAytcBym-Ec+uM-+HEtzuKy=M_g@mail.gmail.com>
Subject: Message With Attachment
From: Adam Coddington <test@adamcoddington.net>
To: Adam Coddington <test@adamcoddington.net>
Content-Type: multipart/mixed; boundary=047d7b33dd729737fe04d3bde348
--047d7b33dd729737fe04d3bde348
Content-Type: text/plain; charset=UTF-8
This message has an attachment.
--047d7b33dd729737fe04d3bde348
Content-Type: image/png; name="heart.png"
Content-Disposition: attachment; filename="heart.png"
Content-Transfer-Encoding: base64
X-Attachment-Id: f_hc6mair60
iVBORw0KGgoAAAANSUhEUgAAAA4AAAAOCAYAAAFoTx1HAAAAzUlEQVQoz32RWxXDIBBEr4NIQEIl
ICESkFAJkRAJSIgEpEQCEqYfu6QUkn7sCcyDGQiSACKSKCAkGwBJwhDwZQNMEiYAIBdQvk7rfaHf
AO8NBJwCxTGhtFgTHVNaNaJeWFu44AXEHzKCktc7zZ0vss+bMoHSiM2b9mQoX1eZCgGqnWskY3gi
XXAAxb8BqFiUgBNY7k49Tu/kV7UKPsefrjEOT9GmghYzrk9V03pjDGYKj3d0c06dKZkpTboRaD9o
B+1m2m81d2Az948xzgdjLaFe95e83AAAAABJRU5ErkJggg==
--047d7b33dd729737fe04d3bde348--