unstructured/example-docs/eml/email-inline-content-disposition.eml
Mike Lay 79a1eb8683
Handle inline and lacking filename (#1109)
Handle Content-Disposition: inline and attachment without filename

* Add new email test example and test with Content-Disposition: inline.
* Move attachment_info above for loop so it is always defined
* Check if item is inline as well as attachment as these both lack an = character to split on
* Create filename if filename is not specified and write file.
* Update list_attachments with new filename
2023-08-14 18:38:53 +00:00

24 lines
657 B
Plaintext

From: Test User <testuser@example.com>
To: recipient@example.com
Subject: Testing Inline
Message-ID: <CAPgCCDEzLVJ-d1OCX_TjFgJU7ugtQrjFybPtAMmmYZzphxNFYg@mail.example.com>
X-Mailer: Claws Mail 4.1.1 (GTK 3.24.34; x86_64-pc-linux-gnu)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="MP_/pqqQE0ldE7RYQcFW3Kd0aQV"
--MP_/pqqQE0ldE7RYQcFW3Kd0aQV
Content-Type: text/plain; charset=US-ASCII
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
This is a test of inline
--MP_/pqqQE0ldE7RYQcFW3Kd0aQV
Content-Type: text/plain
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment; filename=t.txt
test
--MP_/pqqQE0ldE7RYQcFW3Kd0aQV--