From 3ebe77098a63a31d7133155ae38bc1de5cef1a31 Mon Sep 17 00:00:00 2001 From: Mauro D Date: Tue, 14 Dec 2021 15:23:07 +0000 Subject: [PATCH] Lazy HTML/text body conversion. --- src/lib.rs | 36 +++++++++- src/parsers/message.rs | 59 +++------------- tests/legacy/000.txt | 68 +++++++++--------- tests/legacy/001.txt | 72 +++++++++---------- tests/legacy/002.txt | 38 +++++----- tests/legacy/003.txt | 72 +++++++++---------- tests/legacy/004.txt | 78 ++++++++++----------- tests/legacy/005.txt | 50 ++++++------- tests/legacy/006.txt | 82 +++++++++++----------- tests/legacy/007.txt | 44 ++++++------ tests/legacy/008.txt | 102 +++++++++++++-------------- tests/legacy/009.txt | 70 +++++++++---------- tests/legacy/010.txt | 50 ++++++------- tests/legacy/011.txt | 38 +++++----- tests/legacy/012.txt | 56 +++++++-------- tests/legacy/013.txt | 52 +++++++------- tests/legacy/014.txt | 58 +++++++-------- tests/legacy/015.txt | 120 ++++++++++++++++---------------- tests/legacy/016.txt | 74 ++++++++++---------- tests/legacy/017.txt | 90 ++++++++++++------------ tests/legacy/018.txt | 90 ++++++++++++------------ tests/legacy/019.txt | 96 ++++++++++++------------- tests/legacy/020.txt | 74 ++++++++++---------- tests/legacy/021.txt | 94 +++++++++++++------------ tests/legacy/022.txt | 64 ++++++++--------- tests/legacy/023.txt | 142 +++++++++++++++++++------------------ tests/legacy/024.txt | 102 +++++++++++++-------------- tests/legacy/025.txt | 106 ++++++++++++++-------------- tests/legacy/026.txt | 80 +++++++++++---------- tests/legacy/027.txt | 72 +++++++++---------- tests/legacy/028.txt | 50 ++++++------- tests/legacy/029.txt | 52 +++++++------- tests/legacy/030.txt | 95 ++++++++++++------------- tests/legacy/031.txt | 72 +++++++++---------- tests/legacy/032.txt | 78 +++++++++++---------- tests/legacy/033.txt | 68 +++++++++--------- tests/legacy/034.txt | 34 ++++----- tests/legacy/035.txt | 78 +++++++++++---------- tests/legacy/036.txt | 58 +++++++-------- tests/legacy/037.txt | 64 ++++++++--------- tests/legacy/038.txt | 48 ++++++------- tests/legacy/039.txt | 100 +++++++++++++------------- tests/legacy/040.txt | 54 +++++++------- tests/legacy/041.txt | 64 ++++++++--------- tests/legacy/042.txt | 63 ++++++++--------- tests/legacy/043.txt | 42 +++++------ tests/legacy/044.txt | 118 +++++++++++++++---------------- tests/legacy/045.txt | 67 +++++++++--------- tests/legacy/046.txt | 52 +++++++------- tests/legacy/047.txt | 73 ++++++++++--------- tests/legacy/048.txt | 96 ++++++++++++------------- tests/legacy/049.txt | 48 ++++++------- tests/legacy/050.txt | 68 +++++++++--------- tests/legacy/051.txt | 120 +++++++++++++++----------------- tests/legacy/052.txt | 36 +++++----- tests/legacy/053.txt | 62 ++++++++--------- tests/malformed/001.txt | 12 ++-- tests/malformed/002.txt | 3 +- tests/malformed/003.txt | 3 +- tests/malformed/004.txt | 3 +- tests/malformed/005.txt | 12 ++-- tests/malformed/006.txt | 3 +- tests/malformed/007.txt | 3 +- tests/malformed/008.txt | 3 +- tests/malformed/009.txt | 19 +++-- tests/malformed/010.txt | 12 ++-- tests/malformed/011.txt | 19 +++-- tests/malformed/012.txt | 15 ++-- tests/malformed/013.txt | 54 +++++--------- tests/malformed/014.txt | 12 ++-- tests/malformed/015.txt | 60 ++++++++-------- tests/malformed/016.txt | 19 +++-- tests/rfc/000.txt | 147 ++++++++++++++++++--------------------- tests/rfc/001.txt | 50 ++++++------- tests/rfc/002.txt | 100 ++++++++++++-------------- tests/rfc/003.txt | 31 ++++----- tests/rfc/004.txt | 108 +++++++++++++--------------- tests/rfc/005.txt | 80 ++++++++++----------- tests/rfc/006.txt | 32 +++++---- tests/rfc/007.txt | 121 +++++++++++++++----------------- tests/thirdparty/000.txt | 26 +++---- tests/thirdparty/001.txt | 42 ++++------- tests/thirdparty/002.txt | 41 +++++------ tests/thirdparty/003.txt | 96 ++++++++++--------------- tests/thirdparty/004.txt | 104 +++++++++++---------------- tests/thirdparty/005.txt | Bin 6330 -> 6041 bytes tests/thirdparty/006.txt | 14 ++-- tests/thirdparty/007.txt | 64 +++++++---------- tests/thirdparty/008.txt | 58 +++++++-------- tests/thirdparty/009.txt | 32 ++++----- tests/thirdparty/010.txt | 28 ++++---- 91 files changed, 2540 insertions(+), 2875 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index ed29296..5ac562f 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -263,6 +263,7 @@ pub mod parsers; use std::{borrow::Cow, collections::HashMap, fmt}; +use decoders::html::{html_to_text, text_to_html}; #[cfg(feature = "serde_support")] use serde::{Deserialize, Serialize}; @@ -355,6 +356,7 @@ pub struct TextPart<'x> { #[cfg_attr(feature = "serde_support", serde(default))] pub headers: Option>, pub contents: Cow<'x, str>, + pub is_html: bool, } /// A binary (`[u8]`) message part. @@ -933,14 +935,42 @@ impl<'x> Message<'x> { } } + /// Returns the transformed contents an inline HTML body part by position + pub fn get_html_body(&self, pos: usize) -> Option> { + match self.parts.get(*self.html_body.get(pos)?)? { + MessagePart::Text(text) => { + if text.is_html { + Some(text.contents.clone()) + } else { + Some(text_to_html(text.contents.as_ref()).into()) + } + } + _ => None, + } + } + + /// Returns the transformed contents an inline text body part by position + pub fn get_text_body(&self, pos: usize) -> Option> { + match self.parts.get(*self.text_body.get(pos)?)? { + MessagePart::Text(text) => { + if !text.is_html { + Some(text.contents.clone()) + } else { + Some(html_to_text(text.contents.as_ref()).into()) + } + } + _ => None, + } + } + /// Returns an inline HTML body part by position - pub fn get_html_body(&self, pos: usize) -> Option<&dyn BodyPart> { + pub fn get_html_part(&self, pos: usize) -> Option<&dyn BodyPart> { self.get_part(&self.html_body, pos) } /// Returns an inline text body part by position - pub fn get_text_body(&self, pos: usize) -> Option<&dyn BodyPart> { - self.get_part(&self.text_body, pos) + pub fn get_text_part(&self, pos: usize) -> Option<&dyn BodyPart> { + self.get_part(&self.html_body, pos) } /// Returns an attacment by position diff --git a/src/parsers/message.rs b/src/parsers/message.rs index 0df9051..20bc8cc 100644 --- a/src/parsers/message.rs +++ b/src/parsers/message.rs @@ -13,11 +13,8 @@ use std::borrow::Cow; use crate::{ decoders::{ - base64::decode_base64, - charsets::map::get_charset_decoder, - html::{html_to_text, text_to_html}, - quoted_printable::decode_quoted_printable, - DecodeFnc, DecodeResult, + base64::decode_base64, charsets::map::get_charset_decoder, + quoted_printable::decode_quoted_printable, DecodeFnc, DecodeResult, }, AttachmentType, BinaryPart, ContentType, HeaderName, HeaderValue, Headers, Message, MessagePart, MessagePartId, MessageStructure, TextPart, @@ -413,6 +410,7 @@ impl<'x> Message<'x> { }; if is_text { + let is_html = mime_type == MimeType::TextHtml; let text_part = TextPart { contents: result_to_string(bytes, stream.data, content_type), headers: if !mime_part_header.is_empty() { @@ -420,22 +418,13 @@ impl<'x> Message<'x> { } else { None }, + is_html, }; - let is_html = mime_type == MimeType::TextHtml; - if add_to_html && !is_html { message.html_body.push(message.parts.len()); - message.parts.push(MessagePart::Text(TextPart { - headers: None, - contents: text_to_html(&text_part.contents).into(), - })); } else if add_to_text && is_html { message.text_body.push(message.parts.len()); - message.parts.push(MessagePart::Text(TextPart { - headers: None, - contents: html_to_text(&text_part.contents).into(), - })); } if add_to_html && is_html { @@ -515,24 +504,8 @@ impl<'x> Message<'x> { if state.text_parts == message.text_body.len() && state.html_parts != message.html_body.len() { - for part_id in message.html_body[state.html_parts..].iter() { - message.text_body.push( - match message.parts.get(*part_id).unwrap() { - MessagePart::Text(text) => { - let part_id = message.parts.len(); - let text = MessagePart::Text(TextPart { - headers: None, - contents: html_to_text(&text.contents).into(), - }); - message.parts.push(text); - part_id - } - MessagePart::Binary(_) => *part_id, - _ => { - panic!("Unexpected part type"); - } - }, - ); + for &part_id in &message.html_body[state.html_parts..] { + message.text_body.push(part_id); } } @@ -540,24 +513,8 @@ impl<'x> Message<'x> { if state.html_parts == message.html_body.len() && state.text_parts != message.text_body.len() { - for part_id in message.text_body[state.html_parts..].iter() { - message.html_body.push( - match message.parts.get(*part_id).unwrap() { - MessagePart::Text(text) => { - let part_id = message.parts.len(); - let text = MessagePart::Text(TextPart { - headers: None, - contents: text_to_html(&text.contents).into(), - }); - message.parts.push(text); - part_id - } - MessagePart::Binary(_) => *part_id, - _ => { - panic!("Unexpected part type"); - } - }, - ); + for &part_id in &message.text_body[state.html_parts..] { + message.html_body.push(part_id); } } } diff --git a/tests/legacy/000.txt b/tests/legacy/000.txt index 4d80795..7af6c29 100644 --- a/tests/legacy/000.txt +++ b/tests/legacy/000.txt @@ -46,12 +46,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { - "to": { - "Address": { - "name": "Joe Blow", - "address": "jblow@example.com" + "content_transfer_encoding": { + "Text": "base64" + }, + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "redball.png" + } } }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "doug@example.com" + } + }, + "subject": { + "Text": "Test message from Microsoft Outlook 00" + }, + "mime_version": { + "Text": "1.0" + }, "content_type": { "ContentType": { "c_type": "image", @@ -61,6 +78,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, + "to": { + "Address": { + "name": "Joe Blow", + "address": "jblow@example.com" + } + }, + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com" + }, "date": { "DateTime": { "year": 2000, @@ -73,48 +99,22 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "tz_hour": 4, "tz_minute": 0 } - }, - "mime_version": { - "Text": "1.0" - }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com" - }, - "content_transfer_encoding": { - "Text": "base64" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "doug@example.com" - } - }, - "subject": { - "Text": "Test message from Microsoft Outlook 00" - }, - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "redball.png" - } - } } }, "other_values": { + "X-MSMail-Priority": { + "Text": "Normal" + }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" }, - "Importance": { - "Text": "Normal" - }, "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, "X-Priority": { "Text": "3 (Normal)" }, - "X-MSMail-Priority": { + "Importance": { "Text": "Normal" } }, diff --git a/tests/legacy/001.txt b/tests/legacy/001.txt index 2cbc420..7922abb 100644 --- a/tests/legacy/001.txt +++ b/tests/legacy/001.txt @@ -37,28 +37,6 @@ m+APw-ssen als wir.+ACI-=20 { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, - "date": { - "DateTime": { - "year": 2000, - "month": 5, - "day": 17, - "hour": 19, - "minute": 18, - "second": 39, - "tz_before_gmt": true, - "tz_hour": 4, - "tz_minute": 0 - } - }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com" - }, - "mime_version": { - "Text": "1.0" - }, "to": { "AddressList": [ { @@ -80,31 +58,53 @@ m+APw-ssen als wir.+ACI-=20 } } }, - "subject": { - "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com" + }, + "date": { + "DateTime": { + "year": 2000, + "month": 5, + "day": 17, + "hour": 19, + "minute": 18, + "second": 39, + "tz_before_gmt": true, + "tz_hour": 4, + "tz_minute": 0 + } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" }, "from": { "Address": { "name": "Doug Sauder", "address": "doug@example.com" } + }, + "mime_version": { + "Text": "1.0" + }, + "subject": { + "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" } }, "other_values": { "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, - "X-MimeOLE": { - "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" - }, - "X-Priority": { - "Text": "3 (Normal)" - }, "X-MSMail-Priority": { "Text": "Normal" }, "Importance": { "Text": "Normal" + }, + "X-MimeOLE": { + "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" + }, + "X-Priority": { + "Text": "3 (Normal)" } }, "offsets": [ @@ -205,22 +205,18 @@ m+APw-ssen als wir.+ACI-=20 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 614, diff --git a/tests/legacy/002.txt b/tests/legacy/002.txt index 548094d..a7955ae 100644 --- a/tests/legacy/002.txt +++ b/tests/legacy/002.txt @@ -39,6 +39,12 @@ wir."
{ "headers": { "values": { + "subject": { + "Text": "Die Hasen und die Frösche" + }, + "mime_version": { + "Text": "1.0" + }, "content_type": { "ContentType": { "c_type": "text", @@ -48,11 +54,8 @@ wir."
} } }, - "mime_version": { - "Text": "1.0" - }, - "message_id": { - "Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com" + "content_transfer_encoding": { + "Text": "quoted-printable" }, "to": { "Address": { @@ -66,8 +69,8 @@ wir."
"address": "dwsauder@example.com" } }, - "content_transfer_encoding": { - "Text": "quoted-printable" + "message_id": { + "Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com" }, "date": { "DateTime": { @@ -81,20 +84,17 @@ wir."
"tz_hour": 4, "tz_minute": 0 } - }, - "subject": { - "Text": "Die Hasen und die Frösche" } }, "other_values": { "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" }, - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" - }, "X-Priority": { "Text": "2 (High)" + }, + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" } }, "offsets": [ @@ -178,7 +178,7 @@ wir."
] }, "html_body": [ - 1 + 0 ], "text_body": [ 0 @@ -186,17 +186,13 @@ wir."
"parts": [ { "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n" - } - }, - { - "Text": { - "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\n\n" + "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\n\n", + "is_html": true } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 500, diff --git a/tests/legacy/003.txt b/tests/legacy/003.txt index 970a4ef..3a43df8 100644 --- a/tests/legacy/003.txt +++ b/tests/legacy/003.txt @@ -66,6 +66,33 @@ wir."
{ "headers": { "values": { + "message_id": { + "Text": "4.2.0.58.20000519002557.00a88870@pop.example.com" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "alternative", + "attributes": { + "boundary": "=====================_714967308==_.ALT" + } + } + }, + "subject": { + "Text": "Die Hasen und die Frösche" + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, "date": { "DateTime": { "year": 2000, @@ -79,46 +106,19 @@ wir."
"tz_minute": 0 } }, - "message_id": { - "Text": "4.2.0.58.20000519002557.00a88870@pop.example.com" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "alternative", - "attributes": { - "boundary": "=====================_714967308==_.ALT" - } - } - }, "mime_version": { "Text": "1.0" - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } } }, "other_values": { "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" }, - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" - }, "X-Priority": { "Text": "2 (High)" + }, + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" } }, "offsets": [ @@ -205,9 +205,6 @@ wir."
"Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -216,6 +213,9 @@ wir."
"charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -235,7 +235,8 @@ wir."
} ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } }, { @@ -272,7 +273,8 @@ wir."
} ] }, - "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\n" + "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\n", + "is_html": true } } ], diff --git a/tests/legacy/004.txt b/tests/legacy/004.txt index f2ea1c7..f643ad3 100644 --- a/tests/legacy/004.txt +++ b/tests/legacy/004.txt @@ -21,6 +21,36 @@ Slow but steady wins the race. { "headers": { "values": { + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "to": { + "Address": { + "name": "Joe Blow", + "address": "blow@example.com" + } + }, + "subject": { + "Text": "The Hare and the Tortoise" + }, + "mime_version": { + "Text": "1.0" + }, + "message_id": { + "Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com" + }, + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "us-ascii" + } + } + }, "date": { "DateTime": { "year": 2000, @@ -33,47 +63,17 @@ Slow but steady wins the race. "tz_hour": 4, "tz_minute": 0 } - }, - "message_id": { - "Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com" - }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "blow@example.com" - } - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "us-ascii" - } - } - }, - "subject": { - "Text": "The Hare and the Tortoise" - }, - "mime_version": { - "Text": "1.0" } }, "other_values": { "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" }, - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" - }, "X-Priority": { "Text": "5 (Lowest)" + }, + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" } }, "offsets": [ @@ -153,22 +153,18 @@ Slow but steady wins the race. 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.

" - } - }, - { - "Text": { - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 413, diff --git a/tests/legacy/005.txt b/tests/legacy/005.txt index 1adfbd9..574d6b6 100644 --- a/tests/legacy/005.txt +++ b/tests/legacy/005.txt @@ -44,8 +44,20 @@ m+APw-ssen als wir.+ACI-=20 "message_id": { "Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com" }, - "mime_version": { - "Text": "1.0" + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "utf-7" + } + } + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } }, "date": { "DateTime": { @@ -63,29 +75,20 @@ m+APw-ssen als wir.+ACI-=20 "content_transfer_encoding": { "Text": "quoted-printable" }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "utf-7" - } - } + "mime_version": { + "Text": "1.0" }, "subject": { "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } } }, "other_values": { "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, + "X-Priority": { + "Text": "3 (Normal)" + }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" }, @@ -94,9 +97,6 @@ m+APw-ssen als wir.+ACI-=20 }, "Importance": { "Text": "Normal" - }, - "X-Priority": { - "Text": "3 (Normal)" } }, "offsets": [ @@ -197,22 +197,18 @@ m+APw-ssen als wir.+ACI-=20 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"
" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 577, diff --git a/tests/legacy/006.txt b/tests/legacy/006.txt index 0280d40..7e8b3d4 100644 --- a/tests/legacy/006.txt +++ b/tests/legacy/006.txt @@ -86,6 +86,36 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90" + } + } + }, + "subject": { + "Text": "Test message from Microsoft Outlook 00" + }, + "mime_version": { + "Text": "1.0" + }, + "to": { + "Address": { + "name": "Joe Blow", + "address": "jblow@example.com" + } + }, + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com" + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "doug@example.com" + } + }, "date": { "DateTime": { "year": 2000, @@ -98,36 +128,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "tz_hour": 4, "tz_minute": 0 } - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "doug@example.com" - } - }, - "mime_version": { - "Text": "1.0" - }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90" - } - } - }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "jblow@example.com" - } - }, - "subject": { - "Text": "Test message from Microsoft Outlook 00" } }, "other_values": { @@ -247,9 +247,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" - }, "content_disposition": { "ContentType": { "c_type": "attachment", @@ -258,6 +255,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "image", @@ -1628,14 +1628,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "content_transfer_encoding": { "Text": "base64" }, - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "redball.png" - } - } - }, "content_type": { "ContentType": { "c_type": "image", @@ -1644,6 +1636,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "name": "redball.png" } } + }, + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "redball.png" + } + } } }, "offsets": [ diff --git a/tests/legacy/007.txt b/tests/legacy/007.txt index 6cbb0d6..d91c526 100644 --- a/tests/legacy/007.txt +++ b/tests/legacy/007.txt @@ -43,17 +43,17 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 } } }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com" + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "schmuergen@example.com" + } }, "mime_version": { "Text": "1.0" }, - "content_transfer_encoding": { - "Text": "quoted-printable" - }, - "subject": { - "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com" }, "date": { "DateTime": { @@ -74,16 +74,16 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 "address": "doug@example.com" } }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "schmuergen@example.com" - } + "content_transfer_encoding": { + "Text": "quoted-printable" + }, + "subject": { + "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" } }, "other_values": { - "X-MSMail-Priority": { - "Text": "Normal" + "X-Priority": { + "Text": "3 (Normal)" }, "Importance": { "Text": "Normal" @@ -94,8 +94,8 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, - "X-Priority": { - "Text": "3 (Normal)" + "X-MSMail-Priority": { + "Text": "Normal" } }, "offsets": [ @@ -196,22 +196,18 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 601, diff --git a/tests/legacy/008.txt b/tests/legacy/008.txt index a6cf2fa..7299709 100644 --- a/tests/legacy/008.txt +++ b/tests/legacy/008.txt @@ -138,21 +138,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "----=_NextPart_000_0002_01BFC036.AE309650" - } - } - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -166,37 +151,52 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "tz_minute": 0 } }, + "mime_version": { + "Text": "1.0" + }, "message_id": { "Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com" }, + "subject": { + "Text": "Test message from Microsoft Outlook 00" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "----=_NextPart_000_0002_01BFC036.AE309650" + } + } + }, "from": { "Address": { "name": "Doug Sauder", "address": "doug@example.com" } }, - "subject": { - "Text": "Test message from Microsoft Outlook 00" - }, - "mime_version": { - "Text": "1.0" + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } } }, "other_values": { "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, - "Importance": { - "Text": "Normal" - }, - "X-MSMail-Priority": { - "Text": "Normal" - }, "X-Priority": { "Text": "3 (Normal)" }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" + }, + "Importance": { + "Text": "Normal" + }, + "X-MSMail-Priority": { + "Text": "Normal" } }, "offsets": [ @@ -290,29 +290,27 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== 0 ], "text_body": [ - 1 + 0 ], "attachments": [ + { + "Attachment": 1 + }, { "Attachment": 2 }, { "Attachment": 3 - }, - { - "Attachment": 4 } ], "parts": [ - { - "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.
" - } - }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -321,9 +319,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -343,7 +338,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n" + "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n", + "is_html": false } }, { @@ -359,6 +355,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, + "content_transfer_encoding": { + "Text": "base64" + }, "content_disposition": { "ContentType": { "c_type": "attachment", @@ -366,9 +365,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "filename": "blueball.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -3079,14 +3075,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "redball.png" - } - } - }, "content_type": { "ContentType": { "c_type": "image", @@ -3098,6 +3086,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== }, "content_transfer_encoding": { "Text": "base64" + }, + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "redball.png" + } + } } }, "offsets": [ @@ -4584,6 +4580,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, @@ -4592,9 +4591,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== }, { "Part": 3 - }, - { - "Part": 4 } ] }, diff --git a/tests/legacy/009.txt b/tests/legacy/009.txt index 392ed19..8ba7c02 100644 --- a/tests/legacy/009.txt +++ b/tests/legacy/009.txt @@ -39,24 +39,6 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, - "message_id": { - "Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com" - }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "jschmuergen@example.com" - } - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -70,6 +52,30 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." "tz_minute": 0 } }, + "subject": { + "Text": "Die Hasen und die Frösche" + }, + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "jschmuergen@example.com" + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "message_id": { + "Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com" + }, + "mime_version": { + "Text": "1.0" + }, + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -79,26 +85,20 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." "format": "flowed" } } - }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, - "mime_version": { - "Text": "1.0" } }, "other_values": { - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" + "X-Priority": { + "Text": "1 (Highest)" }, "Disposition-Notification-To": { "Text": "" }, + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" + }, "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" - }, - "X-Priority": { - "Text": "1 (Highest)" } }, "offsets": [ @@ -192,22 +192,18 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,
der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der
Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;
allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte
eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste
untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,
welche also wohl noch unglücklicher sein müssen als wir.\"


" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein \nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, \nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der \nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; \nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte \neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste \nuntertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein \nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, \nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 597, diff --git a/tests/legacy/010.txt b/tests/legacy/010.txt index 546237d..3025d4e 100644 --- a/tests/legacy/010.txt +++ b/tests/legacy/010.txt @@ -24,6 +24,12 @@ In einem nahen Teich wollten sie sich nun ers { "headers": { "values": { + "message_id": { + "Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com" + }, + "subject": { + "Text": "Die Hasen und die Fr�sche" + }, "content_type": { "ContentType": { "c_type": "text", @@ -33,6 +39,9 @@ In einem nahen Teich wollten sie sich nun ers } } }, + "mime_version": { + "Text": "1.0" + }, "date": { "DateTime": { "year": 2000, @@ -46,40 +55,31 @@ In einem nahen Teich wollten sie sich nun ers "tz_minute": 0 } }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "subject": { - "Text": "Die Hasen und die Fr�sche" - }, - "mime_version": { - "Text": "1.0" - }, "to": { "Address": { "name": "Heinz M�ller", "address": "mueller@example.com" } }, - "message_id": { - "Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com" - }, "content_transfer_encoding": { "Text": "8bit" + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } } }, "other_values": { - "X-Priority": { - "Text": "1 (Highest)" + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" }, "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" }, - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" + "X-Priority": { + "Text": "1 (Highest)" } }, "offsets": [ @@ -166,22 +166,18 @@ In einem nahen Teich wollten sie sich nun ers 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"


" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n" + "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n\r\n\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 454, diff --git a/tests/legacy/011.txt b/tests/legacy/011.txt index e17aacd..12dc284 100644 --- a/tests/legacy/011.txt +++ b/tests/legacy/011.txt @@ -32,15 +32,12 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= { "headers": { "values": { + "subject": { + "Text": "Die Hasen und die Frösche" + }, "content_transfer_encoding": { "Text": "quoted-printable" }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "jschmuergen@example.com" - } - }, "content_type": { "ContentType": { "c_type": "text", @@ -50,11 +47,14 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= } } }, - "mime_version": { - "Text": "1.0" + "message_id": { + "Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com" }, - "subject": { - "Text": "Die Hasen und die Frösche" + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "jschmuergen@example.com" + } }, "date": { "DateTime": { @@ -69,14 +69,14 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "tz_minute": 0 } }, + "mime_version": { + "Text": "1.0" + }, "from": { "Address": { "name": "Doug Sauder", "address": "dwsauder@example.com" } - }, - "message_id": { - "Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com" } }, "other_values": { @@ -164,22 +164,18 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"


" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 510, diff --git a/tests/legacy/012.txt b/tests/legacy/012.txt index 2ebef2d..f3d97df 100644 --- a/tests/legacy/012.txt +++ b/tests/legacy/012.txt @@ -33,6 +33,21 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 { "headers": { "values": { + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com" + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" + }, + "mime_version": { + "Text": "1.0" + }, "from": { "Address": { "name": "Doug Sauder", @@ -42,18 +57,6 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 "subject": { "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "Windows-1252" - } - } - }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com" - }, "date": { "DateTime": { "year": 2000, @@ -67,16 +70,13 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" - }, - "content_transfer_encoding": { - "Text": "quoted-printable" - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "Windows-1252" + } } } }, @@ -195,22 +195,18 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"
" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 594, diff --git a/tests/legacy/013.txt b/tests/legacy/013.txt index 4396ccf..facd77a 100644 --- a/tests/legacy/013.txt +++ b/tests/legacy/013.txt @@ -34,6 +34,18 @@ welche also wohl noch ungl { "headers": { "values": { + "content_transfer_encoding": { + "Text": "8bit" + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "doug@example.com" + } + }, + "subject": { + "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" + }, "date": { "DateTime": { "year": 2000, @@ -47,9 +59,6 @@ welche also wohl noch ungl "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" - }, "content_type": { "ContentType": { "c_type": "text", @@ -59,18 +68,6 @@ welche also wohl noch ungl } } }, - "subject": { - "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "doug@example.com" - } - }, - "content_transfer_encoding": { - "Text": "8bit" - }, "message_id": { "Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com" }, @@ -79,21 +76,24 @@ welche also wohl noch ungl "name": "Jürgen Schmürgen", "address": "schmuergen@example.com" } + }, + "mime_version": { + "Text": "1.0" } }, "other_values": { - "X-Priority": { - "Text": "3 (Normal)" + "X-Mailer": { + "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" }, - "X-Mailer": { - "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - }, "X-MSMail-Priority": { "Text": "Normal" }, + "X-Priority": { + "Text": "3 (Normal)" + }, "Importance": { "Text": "Normal" } @@ -196,22 +196,18 @@ welche also wohl noch ungl 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der
Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod
selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;
allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte
eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste
untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,
welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n" + "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 589, diff --git a/tests/legacy/014.txt b/tests/legacy/014.txt index 82f6184..cca8912 100644 --- a/tests/legacy/014.txt +++ b/tests/legacy/014.txt @@ -81,14 +81,8 @@ race. =20 "address": "doug@example.com" } }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "alternative", - "attributes": { - "boundary": "----=_NextPart_000_0005_01BFC037.799BEF60" - } - } + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com" }, "to": { "Address": { @@ -96,15 +90,6 @@ race. =20 "address": "jblow@example.com" } }, - "mime_version": { - "Text": "1.0" - }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com" - }, - "subject": { - "Text": "Test message from Microsoft Outlook 00" - }, "date": { "DateTime": { "year": 2000, @@ -117,23 +102,38 @@ race. =20 "tz_hour": 4, "tz_minute": 0 } + }, + "subject": { + "Text": "Test message from Microsoft Outlook 00" + }, + "mime_version": { + "Text": "1.0" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "alternative", + "attributes": { + "boundary": "----=_NextPart_000_0005_01BFC037.799BEF60" + } + } } }, "other_values": { "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, - "X-MSMail-Priority": { - "Text": "Normal" - }, "X-Priority": { "Text": "3 (Normal)" }, - "Importance": { - "Text": "Normal" - }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" + }, + "X-MSMail-Priority": { + "Text": "Normal" + }, + "Importance": { + "Text": "Normal" } }, "offsets": [ @@ -264,16 +264,14 @@ race. =20 } ] }, - "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n" + "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -282,6 +280,9 @@ race. =20 "charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -301,7 +302,8 @@ race. =20 } ] }, - "contents": "\n\n\n\n\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. 
 
Slow but steady wins the race.  \n
\n" + "contents": "\n\n\n\n\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. 
 
Slow but steady wins the race.  \n
\n", + "is_html": true } } ], diff --git a/tests/legacy/015.txt b/tests/legacy/015.txt index fb03153..31da168 100644 --- a/tests/legacy/015.txt +++ b/tests/legacy/015.txt @@ -201,30 +201,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= { "headers": { "values": { - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "=====================_715392540==_" - } - } - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, - "mime_version": { - "Text": "1.0" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -238,22 +214,46 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "tz_minute": 0 } }, - "message_id": { - "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com" + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "=====================_715392540==_" + } + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } }, "subject": { "Text": "Die Hasen und die Frösche" + }, + "message_id": { + "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com" + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "mime_version": { + "Text": "1.0" } }, "other_values": { - "X-Priority": { - "Text": "2 (High)" - }, "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" }, "X-Sender": { "Text": "dwsauder@pop.example.com (Unverified)" + }, + "X-Priority": { + "Text": "2 (High)" } }, "offsets": [ @@ -358,8 +358,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "c_type": "multipart", "c_subtype": "related", "attributes": { - "type": "multipart/alternative", - "boundary": "=====================_715392540==_.REL" + "boundary": "=====================_715392540==_.REL", + "type": "multipart/alternative" } } } @@ -433,7 +433,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa3ed95.png2aa3edd1.png" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa3ed95.png2aa3edd1.png", + "is_html": false } }, { @@ -470,19 +471,28 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\"2aa3ed95.png\"\"2aa3edd1.png\"\n" + "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\"2aa3ed95.png\"\"2aa3edd1.png\"\n", + "is_html": true } }, { "Binary": { "headers": { "values": { - "content_id": { - "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2" - }, "content_transfer_encoding": { "Text": "base64" }, + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "2aa3ed95.png" + } + } + }, + "content_id": { + "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2" + }, "content_type": { "ContentType": { "c_type": "image", @@ -491,14 +501,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "name": "2aa3ed95.png" } } - }, - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "2aa3ed95.png" - } - } } }, "offsets": [ @@ -1868,9 +1870,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "content_id": { "Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3" }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -1887,6 +1886,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "name": "2aa3edd1.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -3390,6 +3392,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, + "content_transfer_encoding": { + "Text": "base64" + }, "content_disposition": { "ContentType": { "c_type": "attachment", @@ -3397,9 +3402,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "filename": "blueball.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -4759,15 +4761,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_type": { - "ContentType": { - "c_type": "image", - "c_subtype": "png", - "attributes": { - "name": "greenball.png" - } - } - }, "content_transfer_encoding": { "Text": "base64" }, @@ -4778,6 +4771,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "filename": "greenball.png" } } + }, + "content_type": { + "ContentType": { + "c_type": "image", + "c_subtype": "png", + "attributes": { + "name": "greenball.png" + } + } } }, "offsets": [ diff --git a/tests/legacy/016.txt b/tests/legacy/016.txt index 112a40d..1372bf2 100644 --- a/tests/legacy/016.txt +++ b/tests/legacy/016.txt @@ -104,30 +104,6 @@ JB@ac)(GTFLiL)!d09'8!!!: "address": "dwsauder@example.com" } }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "jschmuergen@example.com" - } - }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, - "mime_version": { - "Text": "1.0" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "=====================_716373961==_" - } - } - }, - "message_id": { - "Text": "4.2.0.58.20000519005150.00a85230@pop.example.com" - }, "date": { "DateTime": { "year": 2000, @@ -140,14 +116,38 @@ JB@ac)(GTFLiL)!d09'8!!!: "tz_hour": 4, "tz_minute": 0 } + }, + "message_id": { + "Text": "4.2.0.58.20000519005150.00a85230@pop.example.com" + }, + "subject": { + "Text": "Die Hasen und die Frösche" + }, + "mime_version": { + "Text": "1.0" + }, + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "jschmuergen@example.com" + } + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "=====================_716373961==_" + } + } } }, "other_values": { - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" - }, "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + }, + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" } }, "offsets": [ @@ -220,22 +220,17 @@ JB@ac)(GTFLiL)!d09'8!!!: 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 }, { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, { "Text": { "headers": { @@ -270,7 +265,8 @@ JB@ac)(GTFLiL)!d09'8!!!: } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } }, { @@ -3424,14 +3420,14 @@ JB@ac)(GTFLiL)!d09'8!!!: ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, { "Part": 2 - }, - { - "Part": 3 } ] }, diff --git a/tests/legacy/017.txt b/tests/legacy/017.txt index 270c111..0ec29da 100644 --- a/tests/legacy/017.txt +++ b/tests/legacy/017.txt @@ -105,15 +105,30 @@ end { "headers": { "values": { - "message_id": { - "Text": "4.2.0.58.20000519004755.00a86100@pop.example.com" - }, "from": { "Address": { "name": "Doug Sauder", "address": "dwsauder@example.com" } }, + "subject": { + "Text": "The Hare and the Tortoise" + }, + "mime_version": { + "Text": "1.0" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "=====================_716177458==_" + } + } + }, + "message_id": { + "Text": "4.2.0.58.20000519004755.00a86100@pop.example.com" + }, "date": { "DateTime": { "year": 2000, @@ -127,26 +142,11 @@ end "tz_minute": 0 } }, - "subject": { - "Text": "The Hare and the Tortoise" - }, - "mime_version": { - "Text": "1.0" - }, "to": { "Address": { "name": "J�rgen Schm�rgen", "address": "jschmuergen@example.com" } - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "=====================_716177458==_" - } - } } }, "other_values": { @@ -227,22 +227,17 @@ end 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 }, { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.
" - } - }, { "Text": { "headers": { @@ -267,21 +262,14 @@ end } ] }, - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r", + "is_html": false } }, { "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "greenball.png" - } - } - }, "content_transfer_encoding": { "Text": "x-uuencode" }, @@ -293,6 +281,14 @@ end "name": "greenball.png" } } + }, + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "greenball.png" + } + } } }, "offsets": [ @@ -2182,15 +2178,6 @@ end "Binary": { "headers": { "values": { - "content_type": { - "ContentType": { - "c_type": "image", - "c_subtype": "png", - "attributes": { - "name": "blueball.png" - } - } - }, "content_transfer_encoding": { "Text": "x-uuencode" }, @@ -2201,6 +2188,15 @@ end "filename": "blueball.png" } } + }, + "content_type": { + "ContentType": { + "c_type": "image", + "c_subtype": "png", + "attributes": { + "name": "blueball.png" + } + } } }, "offsets": [ @@ -4127,14 +4123,14 @@ end ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, { "Part": 2 - }, - { - "Part": 3 } ] }, diff --git a/tests/legacy/018.txt b/tests/legacy/018.txt index c7ba110..c3f51d3 100644 --- a/tests/legacy/018.txt +++ b/tests/legacy/018.txt @@ -141,27 +141,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "message_id": { - "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com" - }, "mime_version": { "Text": "1.0" }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -175,24 +157,42 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "tz_minute": 0 } }, + "subject": { + "Text": "Die Hasen und die Frösche" + }, + "message_id": { + "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com" + }, "content_type": { "ContentType": { "c_type": "multipart", "c_subtype": "related", "attributes": { - "type": "multipart/alternative", - "boundary": "=====================_715157131==_.REL" + "boundary": "=====================_715157131==_.REL", + "type": "multipart/alternative" } } + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } } }, "other_values": { - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" - }, "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" }, + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" + }, "X-Priority": { "Text": "2 (High)" } @@ -313,9 +313,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -324,6 +321,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -343,13 +343,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "blueball.png\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\nredball.png" + "contents": "blueball.png\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\nredball.png", + "is_html": false } }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -358,9 +362,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -380,13 +381,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\n\"blueball.png\"
\n
\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n\"redball.png\"
\n" + "contents": "\n\"blueball.png\"
\n
\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n\"redball.png\"
\n", + "is_html": true } }, { "Binary": { "headers": { "values": { + "content_id": { + "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0" + }, "content_type": { "ContentType": { "c_type": "image", @@ -399,9 +404,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "content_transfer_encoding": { "Text": "base64" }, - "content_id": { - "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -1775,8 +1777,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { - "content_id": { - "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1" + "content_type": { + "ContentType": { + "c_type": "image", + "c_subtype": "png", + "attributes": { + "name": "redball.png" + } + } }, "content_disposition": { "ContentType": { @@ -1786,14 +1794,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, - "content_type": { - "ContentType": { - "c_type": "image", - "c_subtype": "png", - "attributes": { - "name": "redball.png" - } - } + "content_id": { + "Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1" }, "content_transfer_encoding": { "Text": "base64" diff --git a/tests/legacy/019.txt b/tests/legacy/019.txt index 2c2b777..2bb8e4e 100644 --- a/tests/legacy/019.txt +++ b/tests/legacy/019.txt @@ -147,27 +147,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "doug@example.com" - } - }, - "subject": { - "Text": "Test message from Microsoft Outlook 00" - }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "jblow@example.com" - } - }, - "mime_version": { - "Text": "1.0" - }, "content_type": { "ContentType": { "c_type": "multipart", @@ -177,6 +156,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "doug@example.com" + } + }, + "to": { + "Address": { + "name": "Joe Blow", + "address": "jblow@example.com" + } + }, "date": { "DateTime": { "year": 2000, @@ -189,22 +180,31 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "tz_hour": 4, "tz_minute": 0 } + }, + "subject": { + "Text": "Test message from Microsoft Outlook 00" + }, + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com" + }, + "mime_version": { + "Text": "1.0" } }, "other_values": { - "X-MSMail-Priority": { - "Text": "Normal" + "X-Mailer": { + "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, "X-Priority": { "Text": "3 (Normal)" }, + "Importance": { + "Text": "Normal" + }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" }, - "X-Mailer": { - "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - }, - "Importance": { + "X-MSMail-Priority": { "Text": "Normal" } }, @@ -338,6 +338,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -346,9 +349,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -368,16 +368,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n" + "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -386,6 +384,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -405,13 +406,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\n\n\n\n\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. 
 
Slow but steady wins the race.  \n
\n" + "contents": "\n\n\n\n\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. 
 
Slow but steady wins the race.  \n
\n", + "is_html": true } }, { "Binary": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "base64" + }, "content_disposition": { "ContentType": { "c_type": "attachment", @@ -420,9 +425,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_type": { "ContentType": { "c_type": "image", @@ -1763,6 +1765,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { + "content_type": { + "ContentType": { + "c_type": "image", + "c_subtype": "png", + "attributes": { + "name": "redball.png" + } + } + }, "content_transfer_encoding": { "Text": "base64" }, @@ -1773,15 +1784,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "filename": "redball.png" } } - }, - "content_type": { - "ContentType": { - "c_type": "image", - "c_subtype": "png", - "attributes": { - "name": "redball.png" - } - } } }, "offsets": [ diff --git a/tests/legacy/020.txt b/tests/legacy/020.txt index db7bdd4..b03eb06 100644 --- a/tests/legacy/020.txt +++ b/tests/legacy/020.txt @@ -34,39 +34,21 @@ welche also wohl noch ungl { "headers": { "values": { - "content_transfer_encoding": { - "Text": "8bit" - }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com" - }, - "subject": { - "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)" - }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "iso-8859-1" - } - } - }, - "to": { - "Address": { - "name": "J�rgen Schm�rgen", - "address": "schmuergen@example.com" - } - }, - "mime_version": { - "Text": "1.0" - }, "from": { "Address": { "name": "Doug Sauder", "address": "doug@example.com" } }, + "mime_version": { + "Text": "1.0" + }, + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com" + }, + "content_transfer_encoding": { + "Text": "8bit" + }, "date": { "DateTime": { "year": 2000, @@ -79,22 +61,40 @@ welche also wohl noch ungl "tz_hour": 4, "tz_minute": 0 } + }, + "subject": { + "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)" + }, + "to": { + "Address": { + "name": "J�rgen Schm�rgen", + "address": "schmuergen@example.com" + } + }, + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "iso-8859-1" + } + } } }, "other_values": { - "X-MSMail-Priority": { - "Text": "Normal" - }, "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, "X-Priority": { "Text": "3 (Normal)" }, + "Importance": { + "Text": "Normal" + }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" }, - "Importance": { + "X-MSMail-Priority": { "Text": "Normal" } }, @@ -196,22 +196,18 @@ welche also wohl noch ungl 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der
Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod
selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;
allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte
eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste
untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,
welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n" + "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod\r\nselbst. Auf, laßt uns ein für allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\r\nallein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte\r\neine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\r\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch unglücklicher sein müssen als wir.\"\r\n\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 543, diff --git a/tests/legacy/021.txt b/tests/legacy/021.txt index 741d3ff..5fb73b3 100644 --- a/tests/legacy/021.txt +++ b/tests/legacy/021.txt @@ -191,8 +191,24 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com" + "to": { + "Address": { + "name": "Joe Blow", + "address": "jblow@example.com" + } + }, + "date": { + "DateTime": { + "year": 2000, + "month": 5, + "day": 17, + "hour": 19, + "minute": 47, + "second": 24, + "tz_before_gmt": true, + "tz_hour": 4, + "tz_minute": 0 + } }, "content_type": { "ContentType": { @@ -212,44 +228,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "mime_version": { "Text": "1.0" }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "jblow@example.com" - } - }, "subject": { "Text": "Test message from Microsoft Outlook 00" }, - "date": { - "DateTime": { - "year": 2000, - "month": 5, - "day": 17, - "hour": 19, - "minute": 47, - "second": 24, - "tz_before_gmt": true, - "tz_hour": 4, - "tz_minute": 0 - } + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com" } }, "other_values": { "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" }, - "X-Priority": { - "Text": "3 (Normal)" - }, - "Importance": { - "Text": "Normal" - }, "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, "X-MSMail-Priority": { "Text": "Normal" + }, + "X-Priority": { + "Text": "3 (Normal)" + }, + "Importance": { + "Text": "Normal" } }, "offsets": [ @@ -439,16 +439,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\n\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n\n" + "contents": "\n\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n\n", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -457,6 +455,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -476,16 +477,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\n\n\n\n\n
\"blue
\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. 
 
Slow but steady wins the race.  \n
\n

 
\n" + "contents": "\n\n\n\n\n
\"blue
\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. 
 
Slow but steady wins the race.  \n
\n

 
\n", + "is_html": true } }, { "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" - }, "content_id": { "Text": "938014623@17052000-0f9b" }, @@ -497,6 +496,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "name": "blueball.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -1856,13 +1858,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "greenball.png" - } - } + "content_transfer_encoding": { + "Text": "base64" }, "content_type": { "ContentType": { @@ -1873,8 +1870,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, - "content_transfer_encoding": { - "Text": "base64" + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "greenball.png" + } + } } }, "offsets": [ @@ -3207,6 +3209,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "base64" + }, "content_disposition": { "ContentType": { "c_type": "attachment", @@ -3223,9 +3228,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "name": "redball.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ diff --git a/tests/legacy/022.txt b/tests/legacy/022.txt index 166bafa..8ee2717 100644 --- a/tests/legacy/022.txt +++ b/tests/legacy/022.txt @@ -33,8 +33,8 @@ IiANCg== { "headers": { "values": { - "mime_version": { - "Text": "1.0" + "subject": { + "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)" }, "from": { "Address": { @@ -42,27 +42,9 @@ IiANCg== "address": "doug@example.com" } }, - "to": { - "Address": { - "name": "J�rgen Schm�rgen", - "address": "schmuergen@example.com" - } - }, - "subject": { - "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)" - }, "message_id": { "Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com" }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "iso-8859-1" - } - } - }, "date": { "DateTime": { "year": 2000, @@ -76,25 +58,43 @@ IiANCg== "tz_minute": 0 } }, + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "iso-8859-1" + } + } + }, + "mime_version": { + "Text": "1.0" + }, "content_transfer_encoding": { "Text": "base64" + }, + "to": { + "Address": { + "name": "J�rgen Schm�rgen", + "address": "schmuergen@example.com" + } } }, "other_values": { - "Importance": { - "Text": "Normal" - }, - "X-MimeOLE": { - "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" - }, "X-MSMail-Priority": { "Text": "Normal" }, "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, + "X-MimeOLE": { + "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" + }, "X-Priority": { "Text": "3 (Normal)" + }, + "Importance": { + "Text": "Normal" } }, "offsets": [ @@ -195,22 +195,18 @@ IiANCg== 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"
" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n" + "contents": "Die Hasen und die Frösche\r\n\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 545, diff --git a/tests/legacy/023.txt b/tests/legacy/023.txt index 44ca931..d54be32 100644 --- a/tests/legacy/023.txt +++ b/tests/legacy/023.txt @@ -111,36 +111,9 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= { "headers": { "values": { - "message_id": { - "Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, "mime_version": { "Text": "1.0" }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "=====================_716541962==_" - } - } - }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "jschmuergen@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -153,14 +126,41 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "tz_hour": 4, "tz_minute": 0 } + }, + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "jschmuergen@example.com" + } + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "=====================_716541962==_" + } + } + }, + "message_id": { + "Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com" + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "subject": { + "Text": "Die Hasen und die Frösche" } }, "other_values": { - "X-Mailer": { - "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" - }, "X-Sender": { "Text": "dwsauder@pop.example.com (Unverified)" + }, + "X-Mailer": { + "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" } }, "offsets": [ @@ -233,29 +233,27 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= 0 ], "text_body": [ - 1 + 0 ], "attachments": [ + { + "Attachment": 1 + }, { "Attachment": 2 }, { "Attachment": 3 - }, - { - "Attachment": 4 } ], "parts": [ - { - "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -264,9 +262,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "charset": "iso-8859-1" } } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -286,7 +281,8 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } }, { @@ -296,14 +292,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "content_transfer_encoding": { "Text": "base64" }, - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "blueball.png" - } - } - }, "content_type": { "ContentType": { "c_type": "image", @@ -312,6 +300,14 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "name": "blueball.png" } } + }, + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "blueball.png" + } + } } }, "offsets": [ @@ -1671,14 +1667,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "Text": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "farmerandstork.txt" - } - } - }, "content_type": { "ContentType": { "c_type": "text", @@ -1687,6 +1675,14 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "charset": "us-ascii" } } + }, + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "farmerandstork.txt" + } + } } }, "offsets": [ @@ -1706,13 +1702,22 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= } ] }, - "contents": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r" + "contents": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r", + "is_html": false } }, { "Text": { "headers": { "values": { + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "HasenundFr�sche.txt" + } + } + }, "content_transfer_encoding": { "Text": "quoted-printable" }, @@ -1724,14 +1729,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= "charset": "iso-8859-1" } } - }, - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "HasenundFr�sche.txt" - } - } } }, "offsets": [ @@ -1758,12 +1755,16 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } } ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, @@ -1772,9 +1773,6 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;= }, { "Part": 3 - }, - { - "Part": 4 } ] }, diff --git a/tests/legacy/024.txt b/tests/legacy/024.txt index ffe075c..7badfaf 100644 --- a/tests/legacy/024.txt +++ b/tests/legacy/024.txt @@ -112,14 +112,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { - "subject": { - "Text": "Die Hasen und die Frösche" - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } + "mime_version": { + "Text": "1.0" }, "date": { "DateTime": { @@ -134,8 +128,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "tz_minute": 0 } }, - "message_id": { - "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com" + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "related", + "attributes": { + "type": "text/html", + "boundary": "=====================_715429112==_.REL" + } + } }, "from": { "Address": { @@ -143,18 +150,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "address": "dwsauder@example.com" } }, - "mime_version": { - "Text": "1.0" + "subject": { + "Text": "Die Hasen und die Frösche" }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "related", - "attributes": { - "boundary": "=====================_715429112==_.REL", - "type": "text/html" - } - } + "message_id": { + "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com" } }, "other_values": { @@ -242,32 +242,24 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== ] }, "html_body": [ - 1 + 0 ], "text_body": [ 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 }, { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n" - } - }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -276,6 +268,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -295,20 +290,16 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\n\"2aa48eb6.png\"
\n
\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n\"2aa48ec0.png\"
\n" + "contents": "\n\"2aa48eb6.png\"
\n
\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n\"2aa48ec0.png\"
\n", + "is_html": true } }, { "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "2aa48eb6.png" - } - } + "content_id": { + "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2" }, "content_transfer_encoding": { "Text": "base64" @@ -322,8 +313,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, - "content_id": { - "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2" + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "2aa48eb6.png" + } + } } }, "offsets": [ @@ -1690,14 +1686,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "2aa48ec0.png" - } - } - }, "content_id": { "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3" }, @@ -1712,6 +1700,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "name": "2aa48ec0.png" } } + }, + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "2aa48ec0.png" + } + } } }, "offsets": [ @@ -3205,14 +3201,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, { "Part": 2 - }, - { - "Part": 3 } ] }, diff --git a/tests/legacy/025.txt b/tests/legacy/025.txt index ccf1110..abbd57a 100644 --- a/tests/legacy/025.txt +++ b/tests/legacy/025.txt @@ -174,26 +174,10 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= { "headers": { "values": { - "to": { + "from": { "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, - "message_id": { - "Text": "4.2.0.58.20000519003809.00a85140@pop.example.com" - }, - "date": { - "DateTime": { - "year": 2000, - "month": 5, - "day": 19, - "hour": 0, - "minute": 38, - "second": 13, - "tz_before_gmt": true, - "tz_hour": 4, - "tz_minute": 0 + "name": "Doug Sauder", + "address": "dwsauder@example.com" } }, "mime_version": { @@ -211,11 +195,27 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "subject": { "Text": "Die Hasen und die Frösche" }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" + "date": { + "DateTime": { + "year": 2000, + "month": 5, + "day": 19, + "hour": 0, + "minute": 38, + "second": 13, + "tz_before_gmt": true, + "tz_hour": 4, + "tz_minute": 0 } + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "message_id": { + "Text": "4.2.0.58.20000519003809.00a85140@pop.example.com" } }, "other_values": { @@ -303,12 +303,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= ] }, "html_body": [ - 2 + 1 ], "text_body": [ 1 ], "attachments": [ + { + "Attachment": 2 + }, { "Attachment": 3 }, @@ -317,9 +320,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, { "Attachment": 5 - }, - { - "Attachment": 6 } ], "parts": [ @@ -348,11 +348,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= ] } }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n" - } - }, { "Text": { "headers": { @@ -387,13 +382,17 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\"2aa51367.png\"\"2aa51371.png\"\n" + "contents": "\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n
\"2aa51367.png\"\"2aa51371.png\"\n", + "is_html": true } }, { "Binary": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "base64" + }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -405,9 +404,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "content_id": { "Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2" }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_type": { "ContentType": { "c_type": "image", @@ -1785,14 +1781,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "content_transfer_encoding": { "Text": "base64" }, - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "2aa51371.png" - } - } - }, "content_type": { "ContentType": { "c_type": "image", @@ -1802,6 +1790,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "2aa51371.png" + } + } + }, "content_id": { "Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3" } @@ -3306,9 +3302,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_type": { "ContentType": { "c_type": "image", @@ -3317,6 +3310,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "name": "blueball.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -4685,9 +4681,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_disposition": { "ContentType": { "c_type": "attachment", @@ -4695,6 +4688,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "filename": "greenball.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -6030,23 +6026,23 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "MultiPart": [ 0, [ + { + "Part": 1 + }, { "Part": 2 }, { "Part": 3 - }, - { - "Part": 4 } ] ] }, { - "Part": 5 + "Part": 4 }, { - "Part": 6 + "Part": 5 } ] }, diff --git a/tests/legacy/026.txt b/tests/legacy/026.txt index 9f986e7..3c3b375 100644 --- a/tests/legacy/026.txt +++ b/tests/legacy/026.txt @@ -87,21 +87,6 @@ Birds of a feather flock together. { "headers": { "values": { - "message_id": { - "Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -115,12 +100,27 @@ Birds of a feather flock together. "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "message_id": { + "Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com" + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } }, "subject": { "Text": "Die Hasen und die Frösche" }, + "mime_version": { + "Text": "1.0" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -209,22 +209,17 @@ Birds of a feather flock together. 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 }, { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, { "Text": { "headers": { @@ -259,7 +254,8 @@ Birds of a feather flock together. } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } }, { @@ -271,9 +267,9 @@ Birds of a feather flock together. "c_type": "text", "c_subtype": "plain", "attributes": { - "x-mac-creator": "74747874", "x-mac-type": "54455854", - "name": "HasenundFr�sche.txt" + "name": "HasenundFr�sche.txt", + "x-mac-creator": "74747874" } } }, @@ -313,13 +309,22 @@ Birds of a feather flock together. } ] }, - "contents": "\r\nbegin 600 HasenundFr�sche.txt\r\nM1&EE($AADie Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"

" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 555, diff --git a/tests/legacy/028.txt b/tests/legacy/028.txt index 6110ae9..22fef50 100644 --- a/tests/legacy/028.txt +++ b/tests/legacy/028.txt @@ -159,9 +159,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { - "mime_version": { - "Text": "1.0" - }, "content_type": { "ContentType": { "c_type": "multipart", @@ -171,6 +168,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, + "subject": { + "Text": "Test message from Microsoft Outlook 00" + }, "to": { "Address": { "name": "Joe Blow", @@ -196,28 +196,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "tz_minute": 0 } }, + "mime_version": { + "Text": "1.0" + }, "message_id": { "Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com" - }, - "subject": { - "Text": "Test message from Microsoft Outlook 00" } }, "other_values": { + "X-Priority": { + "Text": "3 (Normal)" + }, "X-MSMail-Priority": { "Text": "Normal" }, "Importance": { "Text": "Normal" }, - "X-Mailer": { - "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" - }, - "X-Priority": { - "Text": "3 (Normal)" - }, "X-MimeOLE": { "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" + }, + "X-Mailer": { + "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" } }, "offsets": [ @@ -380,13 +380,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n\n\n \nSlow but steady wins the race. \n\n\n\n" + "contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n\n\n \nSlow but steady wins the race. \n\n\n\n", + "is_html": false } }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -395,9 +399,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -417,15 +418,16 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\n\n\n\n\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.  
\n
 
\n
\"blue
 
Slow but steady wins \nthe race. 
\n
 
\n
\"red
\n" + "contents": "\n\n\n\n\n

The Hare and the Tortoise
 
A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:  \"Though you be swift as the wind, I will beat you in a \nrace.\"  The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal.  On the day appointed for the race the two started \ntogether.  The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.  The Hare, lying down by \nthe wayside, fell fast asleep.  At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue.  
\n
 
\n
\"blue
 
Slow but steady wins \nthe race. 
\n
 
\n
\"red
\n", + "is_html": true } }, { "Binary": { "headers": { "values": { - "content_id": { - "Text": "823504223@17052000-0f8d" + "content_transfer_encoding": { + "Text": "base64" }, "content_type": { "ContentType": { @@ -436,8 +438,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, - "content_transfer_encoding": { - "Text": "base64" + "content_id": { + "Text": "823504223@17052000-0f8d" } }, "offsets": [ @@ -1797,9 +1799,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" - }, "content_type": { "ContentType": { "c_type": "image", @@ -1811,6 +1810,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== }, "content_id": { "Text": "823504223@17052000-0f94" + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ diff --git a/tests/legacy/029.txt b/tests/legacy/029.txt index 77662f3..49c7fa1 100644 --- a/tests/legacy/029.txt +++ b/tests/legacy/029.txt @@ -30,6 +30,24 @@ Slow but steady wins the race. { "headers": { "values": { + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "message_id": { + "Text": "392362D8.B650789F@example.com" + }, + "to": { + "Address": { + "name": "Joe Blow", + "address": "blow@example.com" + } + }, + "mime_version": { + "Text": "1.0" + }, "date": { "DateTime": { "year": 2000, @@ -43,26 +61,11 @@ Slow but steady wins the race. "tz_minute": 0 } }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "blow@example.com" - } - }, - "content_transfer_encoding": { - "Text": "7bit" - }, "subject": { "Text": "Test message from Netscape Communicator 4.7" }, - "message_id": { - "Text": "392362D8.B650789F@example.com" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } + "content_transfer_encoding": { + "Text": "7bit" }, "content_type": { "ContentType": { @@ -72,9 +75,6 @@ Slow but steady wins the race. "charset": "us-ascii" } } - }, - "mime_version": { - "Text": "1.0" } }, "other_values": { @@ -172,22 +172,18 @@ Slow but steady wins the race. 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.
" - } - }, - { - "Text": { - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 400, diff --git a/tests/legacy/030.txt b/tests/legacy/030.txt index d81395c..54469dc 100644 --- a/tests/legacy/030.txt +++ b/tests/legacy/030.txt @@ -114,6 +114,15 @@ Slow but steady wins the race. { "headers": { "values": { + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "message_id": { + "Text": "3923635B.85C58444@example.com" + }, "date": { "DateTime": { "year": 2000, @@ -127,15 +136,6 @@ Slow but steady wins the race. "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" - }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "blow@example.com" - } - }, "content_type": { "ContentType": { "c_type": "multipart", @@ -145,17 +145,17 @@ Slow but steady wins the race. } } }, - "message_id": { - "Text": "3923635B.85C58444@example.com" - }, - "from": { + "to": { "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" + "name": "Joe Blow", + "address": "blow@example.com" } }, "subject": { "Text": "Test message from Netscape Communicator 4.7" + }, + "mime_version": { + "Text": "1.0" } }, "other_values": { @@ -234,31 +234,26 @@ Slow but steady wins the race. }, "html_body": [ 0, - 2, - 3 + 1, + 2 ], "text_body": [ + 0, 1, - 2, - 3 + 2 ], "attachments": [ + { + "Inline": 1 + }, { "Inline": 2 }, { - "Inline": 3 - }, - { - "Attachment": 4 + "Attachment": 3 } ], "parts": [ - { - "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." - } - }, { "Text": { "headers": { @@ -293,7 +288,8 @@ Slow but steady wins the race. } ] }, - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r", + "is_html": false } }, { @@ -1678,17 +1674,6 @@ Slow but steady wins the race. "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "greenball.png" - } - } - }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_type": { "ContentType": { "c_type": "image", @@ -1697,6 +1682,17 @@ Slow but steady wins the race. "name": "greenball.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" + }, + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "greenball.png" + } + } } }, "offsets": [ @@ -3034,14 +3030,11 @@ Slow but steady wins the race. "c_type": "text", "c_subtype": "plain", "attributes": { - "name": "hareandtoroise.txt", - "charset": "us-ascii" + "charset": "us-ascii", + "name": "hareandtoroise.txt" } } }, - "content_transfer_encoding": { - "Text": "7bit" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -3049,6 +3042,9 @@ Slow but steady wins the race. "filename": "hareandtoroise.txt" } } + }, + "content_transfer_encoding": { + "Text": "7bit" } }, "offsets": [ @@ -3075,12 +3071,16 @@ Slow but steady wins the race. } ] }, - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race. \r\n\r", + "is_html": false } } ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, @@ -3089,9 +3089,6 @@ Slow but steady wins the race. }, { "Part": 3 - }, - { - "Part": 4 } ] }, diff --git a/tests/legacy/031.txt b/tests/legacy/031.txt index 1a600cf..bf367e8 100644 --- a/tests/legacy/031.txt +++ b/tests/legacy/031.txt @@ -108,27 +108,21 @@ Z3VldDZzO7wAAAAASUVORK5CYII= } } }, - "message_id": { - "Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com" - }, "from": { "Address": { "name": "Doug Sauder", "address": "doug@penguin.example.com" } }, - "mime_version": { - "Text": "1.0" - }, - "subject": { - "Text": "Test message from PINE" - }, "to": { "Address": { "name": "Joe Blow", "address": "blow@example.com" } }, + "mime_version": { + "Text": "1.0" + }, "date": { "DateTime": { "year": 2000, @@ -141,6 +135,12 @@ Z3VldDZzO7wAAAAASUVORK5CYII= "tz_hour": 4, "tz_minute": 0 } + }, + "subject": { + "Text": "Test message from PINE" + }, + "message_id": { + "Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com" } }, "offsets": [ @@ -199,22 +199,17 @@ Z3VldDZzO7wAAAAASUVORK5CYII= 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 }, { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "This is a test message from PINE MUA.

" - } - }, { "Text": { "headers": { @@ -239,13 +234,23 @@ Z3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "This is a test message from PINE MUA.\r\n\r\n\r" + "contents": "This is a test message from PINE MUA.\r\n\r\n\r", + "is_html": false } }, { "Binary": { "headers": { "values": { + "content_id": { + "Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com" + }, + "content_transfer_encoding": { + "Text": "BASE64" + }, + "content_description": { + "Text": "A PNG graphic file" + }, "content_type": { "ContentType": { "c_type": "application", @@ -255,15 +260,6 @@ Z3VldDZzO7wAAAAASUVORK5CYII= } } }, - "content_transfer_encoding": { - "Text": "BASE64" - }, - "content_id": { - "Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com" - }, - "content_description": { - "Text": "A PNG graphic file" - }, "content_disposition": { "ContentType": { "c_type": "attachment", @@ -1772,14 +1768,6 @@ Z3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "blueball.png" - } - } - }, "content_type": { "ContentType": { "c_type": "application", @@ -1795,6 +1783,14 @@ Z3VldDZzO7wAAAAASUVORK5CYII= "content_description": { "Text": "A PNG graphic file" }, + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "blueball.png" + } + } + }, "content_transfer_encoding": { "Text": "BASE64" } @@ -3169,14 +3165,14 @@ Z3VldDZzO7wAAAAASUVORK5CYII= ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, { "Part": 2 - }, - { - "Part": 3 } ] }, diff --git a/tests/legacy/032.txt b/tests/legacy/032.txt index 9e7445b..d0c2393 100644 --- a/tests/legacy/032.txt +++ b/tests/legacy/032.txt @@ -142,30 +142,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "address": "blow@example.com" } }, - "subject": { - "Text": "Test message from Netscape Communicator 4.7" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "------------C78F594988075E36AE03C243" - } - } - }, - "message_id": { - "Text": "39235EAD.E48E2160@example.com" - }, - "mime_version": { - "Text": "1.0" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -178,14 +154,38 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "tz_hour": 4, "tz_minute": 0 } + }, + "mime_version": { + "Text": "1.0" + }, + "subject": { + "Text": "Test message from Netscape Communicator 4.7" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "------------C78F594988075E36AE03C243" + } + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "message_id": { + "Text": "39235EAD.E48E2160@example.com" } }, "other_values": { - "X-Accept-Language": { - "Text": "en" - }, "X-Mailer": { "Text": "Mozilla 4.7 [en] (WinNT; I)" + }, + "X-Accept-Language": { + "Text": "en" } }, "offsets": [ @@ -301,6 +301,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -309,9 +312,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "charset": "iso-8859-1" } } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -331,7 +331,8 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n", + "is_html": false } }, { @@ -368,13 +369,17 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "\r\n\r\nDie Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n
 \r\n
 \r\n\r" + "contents": "\r\n\r\nDie Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n
 \r\n
 \r\n\r", + "is_html": true } }, { "Binary": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "image", @@ -384,9 +389,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -1734,6 +1736,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "image", @@ -1742,9 +1747,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "name": "blueball.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ diff --git a/tests/legacy/033.txt b/tests/legacy/033.txt index 5255439..9cc832f 100644 --- a/tests/legacy/033.txt +++ b/tests/legacy/033.txt @@ -36,30 +36,24 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." { "headers": { "values": { - "message_id": { - "Text": "392363E1.2AC47AB3@example.com" - }, - "subject": { - "Text": "Test message from Netscape Communicator 4.7" - }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "blow@example.com" - } + "content_transfer_encoding": { + "Text": "quoted-printable" }, "mime_version": { "Text": "1.0" }, - "content_transfer_encoding": { - "Text": "quoted-printable" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "UTF-8" + } } }, + "message_id": { + "Text": "392363E1.2AC47AB3@example.com" + }, "date": { "DateTime": { "year": 2000, @@ -73,25 +67,31 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." "tz_minute": 0 } }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "UTF-8" - } + "to": { + "Address": { + "name": "Joe Blow", + "address": "blow@example.com" } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "subject": { + "Text": "Test message from Netscape Communicator 4.7" } }, "other_values": { + "X-Mailer": { + "Text": "Mozilla 4.7 [en] (WinNT; I)" + }, "X-Accept-Language": { "Text": "en" }, "X-Priority": { "Text": "5 (Lowest)" - }, - "X-Mailer": { - "Text": "Mozilla 4.7 [en] (WinNT; I)" } }, "offsets": [ @@ -178,22 +178,18 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Fr�sche

Die Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,
der Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der
Tod selbst. Auf, la�t uns ein f�r allemal sterben.\"

In einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;
allein das au�erordentliche Get�se und ihre wunderbare Gestalt
erschreckte eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs
schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein
wenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,
welche also wohl noch ungl�cklicher sein m�ssen als wir.\"
" - } - }, - { - "Text": { - "contents": "Die Hasen und die Fr�sche\n\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der\nTod selbst. Auf, la�t uns ein f�r allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt\nerschreckte eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs\nschnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\n" + "contents": "Die Hasen und die Fr�sche\n\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der\nTod selbst. Auf, la�t uns ein f�r allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt\nerschreckte eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs\nschnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 406, diff --git a/tests/legacy/034.txt b/tests/legacy/034.txt index fe95ef6..627d2c9 100644 --- a/tests/legacy/034.txt +++ b/tests/legacy/034.txt @@ -38,18 +38,21 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir." } } }, - "mime_version": { - "Text": "1.0" - }, - "content_transfer_encoding": { - "Text": "7bit" - }, "to": { "Address": { "name": "Heinz M+APw-ller", "address": "mueller@example.com" } }, + "subject": { + "Text": "Die Hasen und die Fr+APY-sche" + }, + "message_id": { + "Text": "39236497.12FA2A89@example.com" + }, + "mime_version": { + "Text": "1.0" + }, "date": { "DateTime": { "year": 2000, @@ -63,17 +66,14 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir." "tz_minute": 0 } }, - "message_id": { - "Text": "39236497.12FA2A89@example.com" + "content_transfer_encoding": { + "Text": "7bit" }, "from": { "Address": { "name": "Doug Sauder", "address": "dwsauder@example.com" } - }, - "subject": { - "Text": "Die Hasen und die Fr+APY-sche" } }, "other_values": { @@ -161,22 +161,18 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir." 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Fr岣he

Die Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,
der Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der
Tod selbst. Auf, la޴ uns ein f밠allemal sterben.\"

In einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;
allein das auޥrordentliche Get岥 und ihre wunderbare Gestalt
erschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs
schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein
wenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,
welche also wohl noch ungl뢫licher sein m벳en als wir.\"
" - } - }, - { - "Text": { - "contents": "Die Hasen und die Fr岣he\r\n\r\nDie Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\r\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der\r\nTod selbst. Auf, la޴ uns ein f밠allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;\r\nallein das auޥrordentliche Get岥 und ihre wunderbare Gestalt\r\nerschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs\r\nschnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein\r\nwenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl뢫licher sein m벳en als wir.\"\r\n" + "contents": "Die Hasen und die Fr岣he\r\n\r\nDie Hasen klagten einst 롥r ihre miެiche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\r\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist 㱧er als der\r\nTod selbst. Auf, la޴ uns ein f밠allemal sterben.\" \r\n\r\nIn einem nahen Teich wollten sie sich nun ers㴦en; sie eilten ihm zu;\r\nallein das auޥrordentliche Get岥 und ihre wunderbare Gestalt\r\nerschreckte eine Menge Fr岣he, die am Ufer saޥn, so sehr, daݠsie aufs\r\nschnellste untertauchten. \r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers㴦en noch ein\r\nwenig aufschieben, denn auch uns f뱣hten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl뢫licher sein m벳en als wir.\"\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 369, diff --git a/tests/legacy/035.txt b/tests/legacy/035.txt index b3c0ade..8c415a5 100644 --- a/tests/legacy/035.txt +++ b/tests/legacy/035.txt @@ -215,8 +215,11 @@ YII= { "headers": { "values": { - "message_id": { - "Text": "39235FC5.276CCE00@example.com" + "subject": { + "Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)" + }, + "mime_version": { + "Text": "1.0" }, "from": { "Address": { @@ -224,15 +227,6 @@ YII= "address": "dwsauder@example.com" } }, - "mime_version": { - "Text": "1.0" - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -246,8 +240,8 @@ YII= "tz_minute": 0 } }, - "subject": { - "Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)" + "message_id": { + "Text": "39235FC5.276CCE00@example.com" }, "content_type": { "ContentType": { @@ -257,6 +251,12 @@ YII= "boundary": "------------A1E83A41894D3755390B838A" } } + }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } } }, "other_values": { @@ -386,9 +386,6 @@ YII= "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -397,6 +394,9 @@ YII= "charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -416,7 +416,8 @@ YII= } ] }, - "contents": "[blue ball]\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n[Image]\n\n\n" + "contents": "[blue ball]\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n[Image]\n\n\n", + "is_html": false } }, { @@ -447,6 +448,9 @@ YII= "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "7bit" + }, "content_type": { "ContentType": { "c_type": "text", @@ -455,9 +459,6 @@ YII= "charset": "us-ascii" } } - }, - "content_transfer_encoding": { - "Text": "7bit" } }, "offsets": [ @@ -477,21 +478,25 @@ YII= } ] }, - "contents": "\r\n\r\n\"blue\r\n

Die Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n

\r\n
 \r\n
 \r\n\r" + "contents": "\r\n\r\n\"blue\r\n

Die Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n

\r\n
 \r\n
 \r\n\r", + "is_html": true } }, { "Binary": { "headers": { "values": { + "content_id": { + "Text": "part1.39235FC5.E71D8178@example.com" + }, "content_type": { "ContentType": { "c_type": "image", "c_subtype": "png" } }, - "content_id": { - "Text": "part1.39235FC5.E71D8178@example.com" + "content_transfer_encoding": { + "Text": "base64" }, "content_disposition": { "ContentType": { @@ -500,9 +505,6 @@ YII= "filename": "C:TEMPnsmailEG.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -1875,6 +1877,12 @@ YII= "c_subtype": "png" } }, + "content_transfer_encoding": { + "Text": "base64" + }, + "content_id": { + "Text": "part2.39235FC5.E71D8178@example.com" + }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -1882,12 +1890,6 @@ YII= "filename": "C:TEMPnsmail39.png" } } - }, - "content_id": { - "Text": "part2.39235FC5.E71D8178@example.com" - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -3382,9 +3384,6 @@ YII= "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" - }, "content_type": { "ContentType": { "c_type": "image", @@ -3401,6 +3400,9 @@ YII= "filename": "redball.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -4896,6 +4898,9 @@ YII= } } }, + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "image", @@ -4904,9 +4909,6 @@ YII= "name": "greenball.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ diff --git a/tests/legacy/036.txt b/tests/legacy/036.txt index 726538e..05a3b60 100644 --- a/tests/legacy/036.txt +++ b/tests/legacy/036.txt @@ -29,32 +29,20 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 { "headers": { "values": { + "mime_version": { + "Text": "1.0" + }, "from": { "Address": { "name": "Doug Sauder", "address": "doug@penguin.example.com" } }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "schmuergen@example.com" - } + "subject": { + "Text": "Die Hasen und die Frösche" }, - "mime_version": { - "Text": "1.0" - }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "iso-8859-1" - } - } - }, - "message_id": { - "Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com" + "content_transfer_encoding": { + "Text": "QUOTED-PRINTABLE" }, "date": { "DateTime": { @@ -69,11 +57,23 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 "tz_minute": 0 } }, - "subject": { - "Text": "Die Hasen und die Frösche" + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "iso-8859-1" + } + } }, - "content_transfer_encoding": { - "Text": "QUOTED-PRINTABLE" + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "schmuergen@example.com" + } + }, + "message_id": { + "Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com" } }, "offsets": [ @@ -139,22 +139,18 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"


" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 401, diff --git a/tests/legacy/037.txt b/tests/legacy/037.txt index 1e806b1..34fbf31 100644 --- a/tests/legacy/037.txt +++ b/tests/legacy/037.txt @@ -54,10 +54,13 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= { "headers": { "values": { - "to": { + "subject": { + "Text": "Test message from Netscape Communicator 4.7" + }, + "from": { "Address": { - "name": "Joe Blow", - "address": "blow@example.com" + "name": "Doug Sauder", + "address": "dwsauder@example.com" } }, "content_type": { @@ -69,9 +72,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, - "mime_version": { - "Text": "1.0" - }, "message_id": { "Text": "392366A7.21929EA7@example.com" }, @@ -88,22 +88,22 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "tz_minute": 0 } }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } + "mime_version": { + "Text": "1.0" }, - "subject": { - "Text": "Test message from Netscape Communicator 4.7" + "to": { + "Address": { + "name": "Joe Blow", + "address": "blow@example.com" + } } }, "other_values": { - "X-Mailer": { - "Text": "Mozilla 4.7 [en] (WinNT; I)" - }, "X-Accept-Language": { "Text": "en" + }, + "X-Mailer": { + "Text": "Mozilla 4.7 [en] (WinNT; I)" } }, "offsets": [ @@ -174,30 +174,22 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, "html_body": [ 0, - 2 + 1 ], "text_body": [ - 1, - 2 + 0, + 1 ], "attachments": [ { - "Inline": 2 + "Inline": 1 } ], "parts": [ - { - "Text": { - "contents": " " - } - }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "7bit" - }, "content_type": { "ContentType": { "c_type": "text", @@ -206,6 +198,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "charset": "us-ascii" } } + }, + "content_transfer_encoding": { + "Text": "7bit" } }, "offsets": [ @@ -225,7 +220,8 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": " \r" + "contents": " \r", + "is_html": false } }, { @@ -241,6 +237,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, + "content_transfer_encoding": { + "Text": "base64" + }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -248,9 +247,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "filename": "blueball.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -1610,10 +1606,10 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/legacy/038.txt b/tests/legacy/038.txt index d876941..15d5be8 100644 --- a/tests/legacy/038.txt +++ b/tests/legacy/038.txt @@ -20,11 +20,8 @@ Slow but steady wins the race. { "headers": { "values": { - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } + "subject": { + "Text": "Test message from Netscape Communicator 4.7" }, "to": { "Address": { @@ -32,6 +29,15 @@ Slow but steady wins the race. "address": "blow@example.com" } }, + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "us-ascii" + } + } + }, "message_id": { "Text": "3923625B.59F0C3AC@example.com" }, @@ -41,13 +47,10 @@ Slow but steady wins the race. "mime_version": { "Text": "1.0" }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "us-ascii" - } + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" } }, "date": { @@ -62,17 +65,14 @@ Slow but steady wins the race. "tz_hour": 4, "tz_minute": 0 } - }, - "subject": { - "Text": "Test message from Netscape Communicator 4.7" } }, "other_values": { - "X-Accept-Language": { - "Text": "en" - }, "X-Mailer": { "Text": "Mozilla 4.7 [en] (WinNT; I)" + }, + "X-Accept-Language": { + "Text": "en" } }, "offsets": [ @@ -152,22 +152,18 @@ Slow but steady wins the race. 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race.
" - } - }, - { - "Text": { - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 375, diff --git a/tests/legacy/039.txt b/tests/legacy/039.txt index d01fa52..a04ed9d 100644 --- a/tests/legacy/039.txt +++ b/tests/legacy/039.txt @@ -174,20 +174,8 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= { "headers": { "values": { - "subject": { - "Text": "Test message from Netscape Communicator 4.7" - }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "schmuergen@example.com" - } - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } + "mime_version": { + "Text": "1.0" }, "date": { "DateTime": { @@ -202,11 +190,14 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "tz_minute": 0 } }, - "message_id": { - "Text": "39236103.FFE674FC@example.com" + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "schmuergen@example.com" + } }, - "mime_version": { - "Text": "1.0" + "subject": { + "Text": "Test message from Netscape Communicator 4.7" }, "content_type": { "ContentType": { @@ -216,6 +207,15 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "boundary": "------------B7133A01A6B323BF00DBC9A7" } } + }, + "message_id": { + "Text": "39236103.FFE674FC@example.com" + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } } }, "other_values": { @@ -293,27 +293,27 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= ] }, "html_body": [ - 2, - 5, - 6 + 1, + 4, + 5 ], "text_body": [ 1, - 5, - 6 + 4, + 5 ], "attachments": [ + { + "Attachment": 2 + }, { "Attachment": 3 }, { - "Attachment": 4 + "Inline": 4 }, { "Inline": 5 - }, - { - "Inline": 6 } ], "parts": [ @@ -341,11 +341,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= ] } }, - { - "Text": { - "contents": "Die Hasen und die Frösche Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"" - } - }, { "Text": { "headers": { @@ -380,15 +375,16 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "\r\n\r\n\"blue\r\n

Die Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n

\"red\r\n\r" + "contents": "\r\n\r\n\"blue\r\n

Die Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n

\"red\r\n\r", + "is_html": true } }, { "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" + "content_id": { + "Text": "part1.39236103.1B697A54@example.com" }, "content_type": { "ContentType": { @@ -396,9 +392,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "c_subtype": "png" } }, - "content_id": { - "Text": "part1.39236103.1B697A54@example.com" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -406,6 +399,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "filename": "C:TEMPnsmailV0.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -1772,9 +1768,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_id": { - "Text": "part2.39236103.1B697A54@example.com" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -1783,6 +1776,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, + "content_id": { + "Text": "part2.39236103.1B697A54@example.com" + }, "content_type": { "ContentType": { "c_type": "image", @@ -3285,9 +3281,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -3296,6 +3289,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "image", @@ -4645,9 +4641,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, - "content_transfer_encoding": { - "Text": "base64" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -4655,6 +4648,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "filename": "blueball.png" } } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -6017,23 +6013,23 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "MultiPart": [ 0, [ + { + "Part": 1 + }, { "Part": 2 }, { "Part": 3 - }, - { - "Part": 4 } ] ] }, { - "Part": 5 + "Part": 4 }, { - "Part": 6 + "Part": 5 } ] }, diff --git a/tests/legacy/040.txt b/tests/legacy/040.txt index 12f61e6..0d69814 100644 --- a/tests/legacy/040.txt +++ b/tests/legacy/040.txt @@ -31,27 +31,12 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "to": { "Address": { "name": "Jürgen Schmürgen", "address": "schmuergen@example.com" } }, - "message_id": { - "Text": "39236653.CAA8A090@example.com" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, "date": { "DateTime": { "year": 2000, @@ -65,6 +50,24 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= "tz_minute": 0 } }, + "subject": { + "Text": "Die Hasen und die Frösche" + }, + "content_transfer_encoding": { + "Text": "quoted-printable" + }, + "mime_version": { + "Text": "1.0" + }, + "message_id": { + "Text": "39236653.CAA8A090@example.com" + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, "content_type": { "ContentType": { "c_type": "text", @@ -73,17 +76,14 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= "charset": "iso-8859-1" } } - }, - "mime_version": { - "Text": "1.0" } }, "other_values": { - "X-Accept-Language": { - "Text": "en" - }, "X-Mailer": { "Text": "Mozilla 4.7 [en] (WinNT; I)" + }, + "X-Accept-Language": { + "Text": "en" } }, "offsets": [ @@ -163,22 +163,18 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"
" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 425, diff --git a/tests/legacy/041.txt b/tests/legacy/041.txt index 5667280..4a13984 100644 --- a/tests/legacy/041.txt +++ b/tests/legacy/041.txt @@ -60,12 +60,24 @@ vAAAAABJRU5ErkJggg== { "headers": { "values": { + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "-1463757054-170444605-958746196=:8452" + } + } + }, "from": { "Address": { "name": "Doug Sauder", "address": "doug@penguin.example.com" } }, + "subject": { + "Text": "PNG graphic" + }, "message_id": { "Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com" }, @@ -82,18 +94,6 @@ vAAAAABJRU5ErkJggg== "tz_minute": 0 } }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "-1463757054-170444605-958746196=:8452" - } - } - }, - "subject": { - "Text": "PNG graphic" - }, "to": { "Address": { "name": "Heinz Müller", @@ -160,19 +160,14 @@ vAAAAABJRU5ErkJggg== 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 } ], "parts": [ - { - "Text": { - "contents": "" - } - }, { "Text": { "headers": { @@ -197,13 +192,22 @@ vAAAAABJRU5ErkJggg== } ] }, - "contents": "\r" + "contents": "\r", + "is_html": false } }, { "Binary": { "headers": { "values": { + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "redball.png" + } + } + }, "content_type": { "ContentType": { "c_type": "application", @@ -213,22 +217,14 @@ vAAAAABJRU5ErkJggg== } } }, - "content_transfer_encoding": { - "Text": "BASE64" + "content_id": { + "Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com" }, "content_description": { "Text": "red ball" }, - "content_id": { - "Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com" - }, - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "redball.png" - } - } + "content_transfer_encoding": { + "Text": "BASE64" } }, "offsets": [ @@ -1730,10 +1726,10 @@ vAAAAABJRU5ErkJggg== "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/legacy/042.txt b/tests/legacy/042.txt index f469e2c..48278f4 100644 --- a/tests/legacy/042.txt +++ b/tests/legacy/042.txt @@ -61,11 +61,23 @@ Birds of a feather flock together. { "headers": { "values": { + "message_id": { + "Text": "3923686C.99FB5E36@example.com" + }, + "mime_version": { + "Text": "1.0" + }, "subject": { "Text": "Test message from Netscape Communicator 4.7" }, - "message_id": { - "Text": "3923686C.99FB5E36@example.com" + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "------------77060D866A66DC8D0921E051" + } + } }, "from": { "Address": { @@ -86,23 +98,11 @@ Birds of a feather flock together. "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" - }, "to": { "Address": { "name": "Joe Blow", "address": "blow@example.com" } - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "------------77060D866A66DC8D0921E051" - } - } } }, "other_values": { @@ -183,26 +183,18 @@ Birds of a feather flock together. 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 } ], "parts": [ - { - "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." - } - }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "7bit" - }, "content_type": { "ContentType": { "c_type": "text", @@ -211,6 +203,9 @@ Birds of a feather flock together. "charset": "us-ascii" } } + }, + "content_transfer_encoding": { + "Text": "7bit" } }, "offsets": [ @@ -230,13 +225,17 @@ Birds of a feather flock together. } ] }, - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r", + "is_html": false } }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "7bit" + }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -250,13 +249,10 @@ Birds of a feather flock together. "c_type": "text", "c_subtype": "plain", "attributes": { - "charset": "us-ascii", - "name": "farmerandstork.txt" + "name": "farmerandstork.txt", + "charset": "us-ascii" } } - }, - "content_transfer_encoding": { - "Text": "7bit" } }, "offsets": [ @@ -283,17 +279,18 @@ Birds of a feather flock together. } ] }, - "contents": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r" + "contents": "\r\nThe Farmer and the Stork \r\n \r\nA FARMER placed nets on his newly-sown plowlands and caught a\r\nnumber of Cranes, which came to pick up his seed. With them he\r\ntrapped a Stork that had fractured his leg in the net and was\r\nearnestly beseeching the Farmer to spare his life. \"Pray save\r\nme, Master,\" he said, \"and let me go free this once. My broken\r\nlimb should excite your pity. Besides, I am no Crane, I am a\r\nStork, a bird of excellent character; and see how I love and\r\nslave for my father and mother. Look too, at my feathers--\r\nthey are not the least like those of a Crane.\" The Farmer \r\nlaughed aloud and said, \"It may be all as you say, I only know \r\nthis: I have taken you with these robbers, the Cranes, and you \r\nmust die in their company.\" \r\n \r\nBirds of a feather flock together. \r\n\r", + "is_html": false } } ], "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/legacy/043.txt b/tests/legacy/043.txt index 6200270..16211c5 100644 --- a/tests/legacy/043.txt +++ b/tests/legacy/043.txt @@ -64,6 +64,15 @@ als wir." { "headers": { "values": { + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "subject": { + "Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -73,21 +82,6 @@ als wir." } } }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, - "mime_version": { - "Text": "1.0" - }, - "subject": { - "Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)" - }, - "message_id": { - "Text": "392359CF.DFF4527@example.com" - }, "date": { "DateTime": { "year": 2000, @@ -101,6 +95,12 @@ als wir." "tz_minute": 0 } }, + "mime_version": { + "Text": "1.0" + }, + "message_id": { + "Text": "392359CF.DFF4527@example.com" + }, "from": { "Address": { "name": "Doug Sauder", @@ -193,9 +193,6 @@ als wir." "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -204,6 +201,9 @@ als wir." "charset": "iso-8859-1" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -223,7 +223,8 @@ als wir." } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n", + "is_html": false } }, { @@ -260,7 +261,8 @@ als wir." } ] }, - "contents": "\r\n\r\nDie Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n
 \r\n
 \r\n\r" + "contents": "\r\n\r\nDie Hasen und die Frösche\r\n

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n
 \r\n
 \r\n\r", + "is_html": true } } ], diff --git a/tests/legacy/044.txt b/tests/legacy/044.txt index e0cacbf..2dcca3c 100644 --- a/tests/legacy/044.txt +++ b/tests/legacy/044.txt @@ -140,6 +140,21 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= { "headers": { "values": { + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "------------A1FCDEE154E03D875E5D6779" + } + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, "date": { "DateTime": { "year": 2000, @@ -159,29 +174,14 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "address": "blow@example.com" } }, - "subject": { - "Text": "Test message from Netscape Communicator 4.7" - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } + "mime_version": { + "Text": "1.0" }, "message_id": { "Text": "39235E1C.1DC7EA90@example.com" }, - "mime_version": { - "Text": "1.0" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "------------A1FCDEE154E03D875E5D6779" - } - } + "subject": { + "Text": "Test message from Netscape Communicator 4.7" } }, "other_values": { @@ -260,33 +260,28 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, "html_body": [ 0, - 2, - 3, - 4 - ], - "text_body": [ 1, 2, - 3, - 4 + 3 + ], + "text_body": [ + 0, + 1, + 2, + 3 ], "attachments": [ + { + "Inline": 1 + }, { "Inline": 2 }, { "Inline": 3 - }, - { - "Inline": 4 } ], "parts": [ - { - "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,
der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der
Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;
allein das außerordentliche Getöse und ihre wunderbare Gestalt
erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs
schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,
welche also wohl noch unglücklicher sein müssen als wir.\"


" - } - }, { "Text": { "headers": { @@ -321,13 +316,22 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n", + "is_html": false } }, { "Binary": { "headers": { "values": { + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "redball.png" + } + } + }, "content_type": { "ContentType": { "c_type": "image", @@ -339,14 +343,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, "content_transfer_encoding": { "Text": "base64" - }, - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "redball.png" - } - } } }, "offsets": [ @@ -1834,14 +1830,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "greenball.png" - } - } - }, "content_type": { "ContentType": { "c_type": "image", @@ -1853,6 +1841,14 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, "content_transfer_encoding": { "Text": "base64" + }, + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "greenball.png" + } + } } }, "offsets": [ @@ -3185,23 +3181,23 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_type": { + "content_disposition": { "ContentType": { - "c_type": "image", - "c_subtype": "png", + "c_type": "inline", "attributes": { - "name": "blueball.png" + "filename": "blueball.png" } } }, "content_transfer_encoding": { "Text": "base64" }, - "content_disposition": { + "content_type": { "ContentType": { - "c_type": "inline", + "c_type": "image", + "c_subtype": "png", "attributes": { - "filename": "blueball.png" + "name": "blueball.png" } } } @@ -4562,6 +4558,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, @@ -4570,9 +4569,6 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, { "Part": 3 - }, - { - "Part": 4 } ] }, diff --git a/tests/legacy/045.txt b/tests/legacy/045.txt index ac4dfcc..b27193e 100644 --- a/tests/legacy/045.txt +++ b/tests/legacy/045.txt @@ -45,11 +45,8 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= { "headers": { "values": { - "from": { - "Address": { - "name": "Doug Sauder", - "address": "doug@penguin.example.com" - } + "message_id": { + "Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com" }, "to": { "AddressList": [ @@ -63,11 +60,8 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= } ] }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, - "message_id": { - "Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com" + "mime_version": { + "Text": "1.0" }, "date": { "DateTime": { @@ -82,9 +76,6 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" - }, "content_type": { "ContentType": { "c_type": "multipart", @@ -93,6 +84,15 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= "boundary": "-1463757054-891160829-958746372=:8452" } } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "doug@penguin.example.com" + } + }, + "subject": { + "Text": "Die Hasen und die Frösche" } }, "offsets": [ @@ -151,19 +151,14 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 } ], "parts": [ - { - "Text": { - "contents": "" - } - }, { "Text": { "headers": { @@ -188,15 +183,21 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= } ] }, - "contents": "\r" + "contents": "\r", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_description": { - "Text": "Short story in German" + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "HasenundFrösche.txt" + } + } }, "content_type": { "ContentType": { @@ -208,19 +209,14 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= } } }, - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "HasenundFrösche.txt" - } - } + "content_id": { + "Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com" }, "content_transfer_encoding": { "Text": "BASE64" }, - "content_id": { - "Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com" + "content_description": { + "Text": "Short story in German" } }, "offsets": [ @@ -261,17 +257,18 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= } ] }, - "contents": "Die Hasen und die Frösche\r\r\n\r\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\r\n\r\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\r\n\r\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\r\n\r\r\n" + "contents": "Die Hasen und die Frösche\r\r\n\r\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\r\n\r\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\r\n\r\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\r\n\r\r\n", + "is_html": false } } ], "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/legacy/046.txt b/tests/legacy/046.txt index 1c2a3fb..e1fa7e0 100644 --- a/tests/legacy/046.txt +++ b/tests/legacy/046.txt @@ -35,6 +35,24 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." { "headers": { "values": { + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "subject": { + "Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)" + }, + "to": { + "Address": { + "name": "Jürgen Schmürgen", + "address": "schmuergen@example.com" + } + }, + "message_id": { + "Text": "3923561C.B7078DEF@example.com" + }, "date": { "DateTime": { "year": 2000, @@ -48,15 +66,6 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." "tz_minute": 0 } }, - "message_id": { - "Text": "3923561C.B7078DEF@example.com" - }, - "content_transfer_encoding": { - "Text": "quoted-printable" - }, - "subject": { - "Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)" - }, "content_type": { "ContentType": { "c_type": "text", @@ -66,17 +75,8 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." } } }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "to": { - "Address": { - "name": "Jürgen Schmürgen", - "address": "schmuergen@example.com" - } + "content_transfer_encoding": { + "Text": "quoted-printable" }, "mime_version": { "Text": "1.0" @@ -167,22 +167,18 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,
der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der
Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;
allein das außerordentliche Getöse und ihre wunderbare Gestalt
erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs
schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein
wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,
welche also wohl noch unglücklicher sein müssen als wir.\"


" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 453, diff --git a/tests/legacy/047.txt b/tests/legacy/047.txt index 80e14e3..5228092 100644 --- a/tests/legacy/047.txt +++ b/tests/legacy/047.txt @@ -63,33 +63,9 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= { "headers": { "values": { - "mime_version": { - "Text": "1.0" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "------------CA611088711119FBDB3473B4" - } - } - }, - "to": { - "Address": { - "name": "Joe Blow", - "address": "blow@example.com" - } - }, "message_id": { "Text": "392367BC.3D075C95@example.com" }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, "date": { "DateTime": { "year": 2000, @@ -105,6 +81,30 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= }, "subject": { "Text": "Test message from Netscape Communicator 4.7" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "------------CA611088711119FBDB3473B4" + } + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, + "mime_version": { + "Text": "1.0" + }, + "to": { + "Address": { + "name": "Joe Blow", + "address": "blow@example.com" + } } }, "other_values": { @@ -185,19 +185,14 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 } ], "parts": [ - { - "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." - } - }, { "Text": { "headers": { @@ -232,13 +227,17 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= } ] }, - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r", + "is_html": false } }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -247,9 +246,6 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= } } }, - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -285,17 +281,18 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n", + "is_html": false } } ], "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/legacy/048.txt b/tests/legacy/048.txt index 4c0b3ae..6ba55f2 100644 --- a/tests/legacy/048.txt +++ b/tests/legacy/048.txt @@ -158,14 +158,8 @@ end { "headers": { "values": { - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } - }, - "subject": { - "Text": "Test message from Netscape Communicator 4.7" + "message_id": { + "Text": "3923670C.67D83A99@example.com" }, "to": { "Address": { @@ -173,6 +167,12 @@ end "address": "blow@example.com" } }, + "mime_version": { + "Text": "1.0" + }, + "subject": { + "Text": "Test message from Netscape Communicator 4.7" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -195,19 +195,19 @@ end "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" - }, - "message_id": { - "Text": "3923670C.67D83A99@example.com" + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } } }, "other_values": { - "X-Accept-Language": { - "Text": "en" - }, "X-Mailer": { "Text": "Mozilla 4.7 [en] (WinNT; I)" + }, + "X-Accept-Language": { + "Text": "en" } }, "offsets": [ @@ -278,33 +278,28 @@ end }, "html_body": [ 0, - 2, - 3, - 4 - ], - "text_body": [ 1, 2, - 3, - 4 + 3 + ], + "text_body": [ + 0, + 1, + 2, + 3 ], "attachments": [ + { + "Inline": 1 + }, { "Inline": 2 }, { "Inline": 3 - }, - { - "Inline": 4 } ], "parts": [ - { - "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise,
who replied, laughing: \"Though you be swift as the wind, I will beat
you in a race.\" The Hare, believing her assertion to be simply
impossible, assented to the proposal; and they agreed that the Fox
should choose the course and fix the goal. On the day appointed for the
race the two started together. The Tortoise never for a moment stopped,
but went on with a slow but steady pace straight to the end of the
course. The Hare, lying down by the wayside, fell fast asleep. At last
waking up, and moving as fast as he could, he saw the Tortoise had
reached the goal, and was comfortably dozing after her fatigue.

Slow but steady wins the race." - } - }, { "Text": { "headers": { @@ -339,7 +334,8 @@ end } ] }, - "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r" + "contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r", + "is_html": false } }, { @@ -354,6 +350,9 @@ end } } }, + "content_transfer_encoding": { + "Text": "x-uuencode" + }, "content_type": { "ContentType": { "c_type": "image", @@ -362,9 +361,6 @@ end "name": "redball.png" } } - }, - "content_transfer_encoding": { - "Text": "x-uuencode" } }, "offsets": [ @@ -2467,6 +2463,15 @@ end "Binary": { "headers": { "values": { + "content_type": { + "ContentType": { + "c_type": "image", + "c_subtype": "png", + "attributes": { + "name": "greenball.png" + } + } + }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -2477,15 +2482,6 @@ end }, "content_transfer_encoding": { "Text": "x-uuencode" - }, - "content_type": { - "ContentType": { - "c_type": "image", - "c_subtype": "png", - "attributes": { - "name": "greenball.png" - } - } } }, "offsets": [ @@ -4378,9 +4374,6 @@ end } } }, - "content_transfer_encoding": { - "Text": "x-uuencode" - }, "content_type": { "ContentType": { "c_type": "image", @@ -4389,6 +4382,9 @@ end "name": "blueball.png" } } + }, + "content_transfer_encoding": { + "Text": "x-uuencode" } }, "offsets": [ @@ -6310,6 +6306,9 @@ end ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, @@ -6318,9 +6317,6 @@ end }, { "Part": 3 - }, - { - "Part": 4 } ] }, diff --git a/tests/legacy/049.txt b/tests/legacy/049.txt index 9eb9935..44d551b 100644 --- a/tests/legacy/049.txt +++ b/tests/legacy/049.txt @@ -134,18 +134,12 @@ end { "headers": { "values": { - "from": { + "to": { "Address": { - "name": "Doug Sauder", - "address": "doug@example.com" + "name": "Joe Blow", + "address": "jblow@example.com" } }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGIEKGCHAA.doug@example.com" - }, - "subject": { - "Text": "Test message from Microsoft Outlook 00" - }, "date": { "DateTime": { "year": 2000, @@ -159,28 +153,34 @@ end "tz_minute": 0 } }, - "to": { + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGIEKGCHAA.doug@example.com" + }, + "from": { "Address": { - "name": "Joe Blow", - "address": "jblow@example.com" + "name": "Doug Sauder", + "address": "doug@example.com" } + }, + "subject": { + "Text": "Test message from Microsoft Outlook 00" } }, "other_values": { - "Importance": { + "X-MSMail-Priority": { "Text": "Normal" }, - "X-MimeOLE": { - "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" - }, "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, - "X-MSMail-Priority": { - "Text": "Normal" + "X-MimeOLE": { + "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" }, "X-Priority": { "Text": "3 (Normal)" + }, + "Importance": { + "Text": "Normal" } }, "offsets": [ @@ -260,22 +260,18 @@ end 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "
The Hare and the Tortoise

A HARE one day ridiculed the short feet and slow pace of the Tortoise, who
replied, laughing: \"Though you be swift as the wind, I will beat you in a
race.\" The Hare, believing her assertion to be simply impossible, assented
to the proposal; and they agreed that the Fox should choose the course and
fix the goal. On the day appointed for the race the two started together.
The Tortoise never for a moment stopped, but went on with a slow but steady
pace straight to the end of the course. The Hare, lying down by the
wayside, fell fast asleep. At last waking up, and moving as fast as he
could, he saw the Tortoise had reached the goal, and was comfortably dozing
after her fatigue.

Slow but steady wins the race.


begin 666 blueball.png
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`
M``@``! ``!@`````\"\"D`$$(`$$H`\"#$`$%(((7,(*7L(*80((6L`&%H`\"#D(
M(6,0.9P80J480JT80K40.:40,90`&%(0,8PI4K4Y8\\8Y8\\XI6LX82LX80LX8
M0KU\":\\9[G-:<O=Z,M=YCE.<Q:]XA4MX82M880L80,:4``\"'.Y^_G[^^<QN]2
MA.\\I6N<0.:U*>\\ZMSMZESN]:C.\\0,9Q:A-:MUN?.[^^,O>]*>^\\8.:482L:,
MO>>UY^^4O>\\``\"E:C.=SI>]KG.\\(*8PQ8^\\I6N\\((7L`````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````#!
M,@U5`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N
M,3U>OF@```&(241!5'B<==)M5YLP& ;@$DZ )A!2DX;,\"4RG!2+:JHO;K&_;
M?/G_ORA[TE;LL<>;+YQSG3LAY!F-A@0H1\"APHYT$.(HA48+#CXS'A*80DK$H
M0=OH<DXG>T(*,54I*9+0#>J23(LO^U\\/RJJ64PV(!L1,[WT[//I^?#)K6MGI
M+#)O>P8QG>P?GO:G9^?SIFP7BC\"\\*;J$:W%QV??]U8]Y4]7\"4I:#>0PB,I'7
M/_O^U^^;65/60H&%:PMCNKR]OKN_?_\"U5B[>S3T66I0'?_[^N_&[U:+3A*_,
MC1QF3Z*=S9]?&D]R:M,L3@9+EW75@%1 \"ZLIC_UW>GLLJ)5M65:W-=!2:<+\\
M^59F8J*F==U\"28H.B,.2&PMSEJJE%%(N.JOT:U9$9K4D6(\"++%6VZZRU*O6$
MUS5_B# 'U$HIG5+\"BR@9\"(HF'W-\"*7TEG(^!UBNNS\"&3QP7CG#.X=[-I;7XV
M8))'D!PF`FV3QP`9@XT)W^7M;OUK@. 9P&T-Q6ZVI^E3^8B[X[L#_P$45,S8
MF6D.OP```\"5T15AT0V]M;65N= !C;&EP,F=I9B!V+C N-B!B>2!9=F5S(%!I
49W5E=#9S.[P`````245.1*Y\"8((`
`
end

begin 666 greenball.png
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`
M````$ ``& ``(0``\" ``,0``0@``4@``6@``2@`(8P`(<P`(>P`0C `(:P``
M.0``8P`0E `0G `AI0`0I0`AK0!\"O1ACQC%CQCE2QB$IS@`8O0`0K0`8K0`A
MO0\"4UF.MUGN$UE)*WA@AU@`8Q@`8M0``*0!\"SA#.YY3>YZW&YY24YV-2YR$A
MW@`8S@!2WB&<YVO6[YR][XR$[U)\"[Q\"M[WNEWG-:[RDAYP`8U@`QYP!2[R%K
M[SE*[Q@IYP`I[P`Q[P`(A `0M0``````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M````````````````````````````````````````````````````````````
M```````````````````````````````````````````````````````````I
MU?G9`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N
M,3U>OF@```%M241!5'B<==)M5\\(@% =P#VS(@,$$U^-<J=LH*^FYM\"RS[_^9
MB+F'LRSOJYWS._<R^-]>KRU;5>]/60`]SX,0^'\\8HC[&`29]Y('?:!&F+.2<
MAR(@R.NVVF@02C4<#N-8<H&C+B+*U<'AT?'):3**.<,(M@8Q3\\].SL?CR33+
M\"\\4%T<V9-F*JN)A<SJZN;^8F25481%Y]&>#:LMN[^]G#XU-FDB)VC<V)WD 6
M9]/KYY?'U\\72F1N*4374:J'R[.U]M?KX-%E>_PW8#K614(E9K+_6\\Z7)DR)5
M&]$:$C(QV7R9F9)&BH>4:+^V`8\\38\\HF1ZGD+*AN[TSC4*5)7LIWJN2V#52)
M6-AWSS)*\"R>Q(T9Q!/W:?$T$ERJ.E9)RP\\KW!$V2%B)\"RQ XWX2\"D@ZY1A=>
M0!EC0M\"@W]+6K ]T1##&U$6K84.VWA,`-4*11EZU$YV]<1^^#V&Y+*TTV=K_
MJK<?N]NT5W;QG_7=A1_-8>>-T@@L+ ```\"5T15AT0V]M;65N= !C;&EP,F=I
F9B!V+C N-B!B>2!9=F5S(%!I9W5E=#9S.[P`````245.1*Y\"8((`
`
end

begin 666 redball.png
MB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`
M```!```+```5```:```7```1```*```#```<```R``!$``!-``!(```]```C
M```6```F``!A``![``\"&``\"'``!]``!T``!@```Y```4```&```G``!+``!O
M``\"0``\"E``\"[``\"_``\"K``\"A``\",``!S``!;```N```(``!,``!W``\"9``\"T
M&1G*.#C5/3W;*2G=!06X``\"H``!Y```Q```8```$``!%``\":``\"[)\"3186'?
MA(3F?W_F5E;J'Q_2``\"Y``\"C``!=``!\"```H```)``!G``\"Z#P_05%3>DY/E
MK*SIF9GM967O)277``#!``\"Q``\"<``!M``!3```V```;```%``!*``\"!``#+
M(\"#=9V?HG)SKIJ;MBHKO45'O%!31``##``\"V``!X``!>``! ```B``!7``\"2
M``#\"``#:&QOH557L>'CO>'CO5U?O)B;A``#.``\"W``\"G``\"5``!'```K```/
M``\"=``#%``#A!07K*\"CO/#SO-37O&QOC``#0``#)``\"U``\"7``\"$``!L``!/
M```2```\"``!B``#I``#O`@+G``#8``#+``\"Z``\"P``!P```3```D``!8``#(
M``#3``#-``\"S``\"#``!N```>``!^``# ``\"D``\"-``!_``!I``!0```P``\"1
M``\"I``\"\\``\"J``\";``!E``!)```J```.```T``\"L``\"O``\"M``\"F``\")``!Z
M``!K``!:```^```I``!J``\"\"``\"?``\">``\"6``\"/``!\\```9```'``!5``\".
M``\"*```X```0```_``!R``\" ``!<```W```L``!F``!#``!6```@```S```\\
M```Z```?```,```=```-````````````````````````````````````````
M````````````````````````````````````````````````````````````
M``````````````````````````````````````````````````````````#\\
M+ME%`````7123E,`0.;89@```!9T15AT4V]F='=A<F4`9VEF,G!N9R R+C N
M,3U>OF@```((241!5'B<8V\" @_\\0P( !F)A96%G9V#DX,:4YN+AY>'GY^+D%
M!#E0)?\\S\"_$(BXB*B4M(\\DH)2<L@R?YGEI635U!44E9155/7X-%DU4)(R@AI
MZ^CJZ1L8&AF;*)@*\\YF96\\#D_K-:2EA9V]C:V3LX.CDKZ+BXNK%#-?YW-_.P
M\\O3R]O'U\\P\\(# H6#0D-\"X^ 2/YGBXP*BHZ)C8M/2$Q*3G%62$U+%X Z]G]&
M9E9V3FY>?D%A47%R26E9E$=Y1258[C^3D&15=4UM77U#8U.S<DMI:UM[AV8G
M. C^=[EUMRH[]O3V]2=-2)XX2;%5='(H]Q2('-/4:6J3IB?-2)K9G*TT2T4U
M:_:<4&YIB-S_N7+S5)VJFZ=7SY\\X2V6!U<)%BY<LA9KYW]Q5?MGR%*453BV3
M5CJORA)+7;UF[3JH'/MZ%_'6T@T;-ZW<K&J5M67KMNT[!)BA<LP[U^S:G16\\
M9\\]>JWW[10_(IZTQ.W@($E7_+;BD#F\\3WZ*P;-F1H[.WSI'D/29P'!J+__\\?
MESUQV..DR*)3B[:J;SNM?49(V@(N%\\%VEK_#Y=PV^?9=PIE\\85.E(^\")X_]_
MCH.R8>=Y0S,OA&JGFV5T6B\"EF___#TE?7'M)ZO+E*]P[KQ[O0DY20);%M2FL
MUR]>O7B=[09:<@.QF2QDM-S=M2PP4^)_5(\":\"/%(84W7`)A(.MC?YL?R````
M)71%6'1#;VUM96YT`&-L:7 R9VEF('8N,\"XV(&)Y(%EV97,@4&EG=65T-G,[
-O ````!)14Y$KD)@@@``
`
end
" - } - }, - { - "Text": { - "contents": "\r\nThe Hare and the Tortoise\r\n\r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who\r\nreplied, laughing: \"Though you be swift as the wind, I will beat you in a\r\nrace.\" The Hare, believing her assertion to be simply impossible, assented\r\nto the proposal; and they agreed that the Fox should choose the course and\r\nfix the goal. On the day appointed for the race the two started together.\r\nThe Tortoise never for a moment stopped, but went on with a slow but steady\r\npace straight to the end of the course. The Hare, lying down by the\r\nwayside, fell fast asleep. At last waking up, and moving as fast as he\r\ncould, he saw the Tortoise had reached the goal, and was comfortably dozing\r\nafter her fatigue.\r\n\r\nSlow but steady wins the race.\r\n\r\n\r\nbegin 666 blueball.png\r\nMB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r\nM``@``! ``!@`````\"\"D`$$(`$$H`\"#$`$%(((7,(*7L(*80((6L`&%H`\"#D(\r\nM(6,0.9P80J480JT80K40.:40,90`&%(0,8PI4K4Y8\\8Y8\\XI6LX82LX80LX8\r\nM0KU\":\\9[G-:\\ZMSMZESN]:C.\\0,9Q:A-:MUN?.[^^,O>]*>^\\8.:482L:,\r\nMO>>UY^^4O>\\``\"E:C.=SI>]KG.\\(*8PQ8^\\I6N\\((7L`````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM``````````````````````````````````````````````````````````#!\r\nM,@U5`````7123E,`0.;89@```!9T15AT4V]F='=AOF@```&(241!5'B<==)M5YLP& ;@$DZ )A!2DX;,\"4RG!2+:JHO;K&_;\r\nM?/G_ORA[TE;LL<>;+YQSG3LAY!F-A@0H1\"APHYT$.(HA48+#CXS'A*80DK$H\r\nM0=OHT(*,54I*9+0#>J23(LO^U\\/RJJ64PV(!L1,[WT[//I^?#)K6MGI\r\nM+#)O>P8QG>P?GO:G9^?SIFP7BC\"\\*;J$:W%QV??]U8]Y4]7\"4I:#>0PB,I'7\r\nM/_O^U^^;65/60H&%:PMCNKR]OKN_?_\"U5B[>S3T66I0'?_[^N_&[U:+3A*_,\r\nMC1QF3Z*=S9]?&D]R:M,L3@9+EW75@%1 \"ZLIC_UW>GLLJ)5M65:W-=!2:<+\\\r\nM^59F8J*F==U\"28H.B,.2&PMSEJJE%%(N.JOT:U9$9K4D6(\"++%6VZZRU*O6$\r\nMUS5_B# 'U$HIG5+\"BR@9\"(HF'W-\"*7TEG(^!UBNNS\"&3QP7CG#.X=[-I;7XV\r\nM8))'D!PF`FV3QP`9@XT)W^7M;OUK@. 9P&T-Q6ZVI^E3^8B[X[L#_P$45,S8\r\nMF6D.OP```\"5T15AT0V]M;65N= !C;&EP,F=I9B!V+C N-B!B>2!9=F5S(%!I\r\n49W5E=#9S.[P`````245.1*Y\"8((`\r\n`\r\nend\r\n\r\nbegin 666 greenball.png\r\nMB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r\nM````$ ``& ``(0``\" ``,0``0@``4@``6@``2@`(8P`(P`0C `(:P``\r\nM.0``8P`0E `0G `AI0`0I0`AK0!\"O1ACQC%CQCE2QB$IS@`8O0`0K0`8K0`A\r\nMO0\"4UF.MUGN$UE)*WA@AU@`8Q@`8M0``*0!\"SA#.YY3>YZW&YY24YV-2YR$A\r\nMW@`8S@!2WB&KRU;5>]/60`]SX,0^'\\8HC[&`29]Y('?:!&F+.2<\r\nMAR(@R.NVVF@02C4<#N-8#:LMN[^]G#XU-FDB)VC_PW8#K614(E9K+_6\\Z7)DR)5\r\nM&]$:$C(QV7R9F9)&BH>4:+^V`8\\38\\HF1ZGD+*AN[TSC4*5)7LIWJN2V#52)\r\nM6-AWSS)*\"R>Q(T9Q!/W:?$T$ERJ.E9)RP\\KW!$V2%B)\"RQ XWX2\"D@ZY1A=>\r\nM0!EC0M\"@W]+6K ]T1##&U$6K84.VWA,`-4*11EZU$YV]<1^^#V&Y+*TTV=K_\r\nMJK>-T@@L+ ```\"5T15AT0V]M;65N= !C;&EP,F=I\r\nF9B!V+C N-B!B>2!9=F5S(%!I9W5E=#9S.[P`````245.1*Y\"8((`\r\n`\r\nend\r\n\r\nbegin 666 redball.png\r\nMB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r\nM```!```+```5```:```7```1```*```#```<```R``!$``!-``!(```]```C\r\nM```6```F``!A``![``\"&``\"'``!]``!T``!@```Y```4```&```G``!+``!O\r\nM``\"0``\"E``\"[``\"_``\"K``\"A``\",``!S``!;```N```(``!,``!W``\"9``\"T\r\nM&1G*.#C5/3W;*2G=!06X``\"H``!Y```Q```8```$``!%``\":``\"[)\"3186'?\r\nMA(3F?W_F5E;J'Q_2``\"Y``\"C``!=``!\"```H```)``!G``\"Z#P_05%3>DY/E\r\nMK*SIF9GM967O)277``#!``\"Q``\"<``!M``!3```V```;```%``!*``\"!``#+\r\nM(\"#=9V?HG)SKIJ;MBHKO45'O%!31``##``\"V``!X``!>``! ```B``!7``\"2\r\nM``#\"``#:&QOH557L>'CO>'CO5U?O)B;A``#.``\"W``\"G``\"5``!'```K```/\r\nM``\"=``#%``#A!07K*\"CO/#SO-37O&QOC``#0``#)``\"U``\"7``\"$``!L``!/\r\nM```2```\"``!B``#I``#O`@+G``#8``#+``\"Z``\"P``!P```3```D``!8``#(\r\nM``#3``#-``\"S``\"#``!N```>``!^``# ``\"D``\"-``!_``!I``!0```P``\"1\r\nM``\"I``\"\\``\"J``\";``!E``!)```J```.```T``\"L``\"O``\"M``\"F``\")``!Z\r\nM``!K``!:```^```I``!J``\"\"``\"?``\">``\"6``\"/``!\\```9```'``!5``\".\r\nM``\"*```X```0```_``!R``\" ``!<```W```L``!F``!#``!6```@```S```\\\r\nM```Z```?```,```=```-````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM``````````````````````````````````````````````````````````#\\\r\nM+ME%`````7123E,`0.;89@```!9T15AT4V]F='=AOF@```((241!5'B<8V\" @_\\0P( !F)A96%G9V#DX,:4YN+AY>'GY^+D%\r\nM!#E0)?\\S\"_$(BXB*B4M(\\DH)2?D%A47%R26E9E$=Y1258[C^3D&15=4UM77U#8U.SJWW[10_(IZTQ.W@($E7_+;BD#F\\3WZ*P;-F1H[.WSI'D/29P'!J+__\\?\r\nMESUQV..DR*)3B[:J;SNM?49(V@(N%\\%VEK_#Y=PV^?9=PIE\\85.E(^\")X_]_\r\nMCH.R8>=Y0S,OA&JGFV5T6B\"EF___#TE?7'M)ZO+E*]P[KQ[O0DY20);%M2FL\r\nMUR]>O7B=[09:<@.QF2QDM-S=M2PP4^)_5(\":\"/%(84W7`)A(.MC?YL?R````\r\nM)71%6'1#;VUM96YT`&-L:7 R9VEF('8N,\"XV(&)Y(%EV97,@4&EG=65T-G,[\r\n-O ````!)14Y$KD)@@@``\r\n`\r\nend\r\n" + "contents": "\r\nThe Hare and the Tortoise\r\n\r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who\r\nreplied, laughing: \"Though you be swift as the wind, I will beat you in a\r\nrace.\" The Hare, believing her assertion to be simply impossible, assented\r\nto the proposal; and they agreed that the Fox should choose the course and\r\nfix the goal. On the day appointed for the race the two started together.\r\nThe Tortoise never for a moment stopped, but went on with a slow but steady\r\npace straight to the end of the course. The Hare, lying down by the\r\nwayside, fell fast asleep. At last waking up, and moving as fast as he\r\ncould, he saw the Tortoise had reached the goal, and was comfortably dozing\r\nafter her fatigue.\r\n\r\nSlow but steady wins the race.\r\n\r\n\r\nbegin 666 blueball.png\r\nMB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r\nM``@``! ``!@`````\"\"D`$$(`$$H`\"#$`$%(((7,(*7L(*80((6L`&%H`\"#D(\r\nM(6,0.9P80J480JT80K40.:40,90`&%(0,8PI4K4Y8\\8Y8\\XI6LX82LX80LX8\r\nM0KU\":\\9[G-:\\ZMSMZESN]:C.\\0,9Q:A-:MUN?.[^^,O>]*>^\\8.:482L:,\r\nMO>>UY^^4O>\\``\"E:C.=SI>]KG.\\(*8PQ8^\\I6N\\((7L`````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM``````````````````````````````````````````````````````````#!\r\nM,@U5`````7123E,`0.;89@```!9T15AT4V]F='=AOF@```&(241!5'B<==)M5YLP& ;@$DZ )A!2DX;,\"4RG!2+:JHO;K&_;\r\nM?/G_ORA[TE;LL<>;+YQSG3LAY!F-A@0H1\"APHYT$.(HA48+#CXS'A*80DK$H\r\nM0=OHT(*,54I*9+0#>J23(LO^U\\/RJJ64PV(!L1,[WT[//I^?#)K6MGI\r\nM+#)O>P8QG>P?GO:G9^?SIFP7BC\"\\*;J$:W%QV??]U8]Y4]7\"4I:#>0PB,I'7\r\nM/_O^U^^;65/60H&%:PMCNKR]OKN_?_\"U5B[>S3T66I0'?_[^N_&[U:+3A*_,\r\nMC1QF3Z*=S9]?&D]R:M,L3@9+EW75@%1 \"ZLIC_UW>GLLJ)5M65:W-=!2:<+\\\r\nM^59F8J*F==U\"28H.B,.2&PMSEJJE%%(N.JOT:U9$9K4D6(\"++%6VZZRU*O6$\r\nMUS5_B# 'U$HIG5+\"BR@9\"(HF'W-\"*7TEG(^!UBNNS\"&3QP7CG#.X=[-I;7XV\r\nM8))'D!PF`FV3QP`9@XT)W^7M;OUK@. 9P&T-Q6ZVI^E3^8B[X[L#_P$45,S8\r\nMF6D.OP```\"5T15AT0V]M;65N= !C;&EP,F=I9B!V+C N-B!B>2!9=F5S(%!I\r\n49W5E=#9S.[P`````245.1*Y\"8((`\r\n`\r\nend\r\n\r\nbegin 666 greenball.png\r\nMB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r\nM````$ ``& ``(0``\" ``,0``0@``4@``6@``2@`(8P`(P`0C `(:P``\r\nM.0``8P`0E `0G `AI0`0I0`AK0!\"O1ACQC%CQCE2QB$IS@`8O0`0K0`8K0`A\r\nMO0\"4UF.MUGN$UE)*WA@AU@`8Q@`8M0``*0!\"SA#.YY3>YZW&YY24YV-2YR$A\r\nMW@`8S@!2WB&KRU;5>]/60`]SX,0^'\\8HC[&`29]Y('?:!&F+.2<\r\nMAR(@R.NVVF@02C4<#N-8#:LMN[^]G#XU-FDB)VC_PW8#K614(E9K+_6\\Z7)DR)5\r\nM&]$:$C(QV7R9F9)&BH>4:+^V`8\\38\\HF1ZGD+*AN[TSC4*5)7LIWJN2V#52)\r\nM6-AWSS)*\"R>Q(T9Q!/W:?$T$ERJ.E9)RP\\KW!$V2%B)\"RQ XWX2\"D@ZY1A=>\r\nM0!EC0M\"@W]+6K ]T1##&U$6K84.VWA,`-4*11EZU$YV]<1^^#V&Y+*TTV=K_\r\nMJK>-T@@L+ ```\"5T15AT0V]M;65N= !C;&EP,F=I\r\nF9B!V+C N-B!B>2!9=F5S(%!I9W5E=#9S.[P`````245.1*Y\"8((`\r\n`\r\nend\r\n\r\nbegin 666 redball.png\r\nMB5!.1PT*&@H````-24A$4@```!L````;\" ,```\"Z\"@1G```#`%!,5$7___\\`\r\nM```!```+```5```:```7```1```*```#```<```R``!$``!-``!(```]```C\r\nM```6```F``!A``![``\"&``\"'``!]``!T``!@```Y```4```&```G``!+``!O\r\nM``\"0``\"E``\"[``\"_``\"K``\"A``\",``!S``!;```N```(``!,``!W``\"9``\"T\r\nM&1G*.#C5/3W;*2G=!06X``\"H``!Y```Q```8```$``!%``\":``\"[)\"3186'?\r\nMA(3F?W_F5E;J'Q_2``\"Y``\"C``!=``!\"```H```)``!G``\"Z#P_05%3>DY/E\r\nMK*SIF9GM967O)277``#!``\"Q``\"<``!M``!3```V```;```%``!*``\"!``#+\r\nM(\"#=9V?HG)SKIJ;MBHKO45'O%!31``##``\"V``!X``!>``! ```B``!7``\"2\r\nM``#\"``#:&QOH557L>'CO>'CO5U?O)B;A``#.``\"W``\"G``\"5``!'```K```/\r\nM``\"=``#%``#A!07K*\"CO/#SO-37O&QOC``#0``#)``\"U``\"7``\"$``!L``!/\r\nM```2```\"``!B``#I``#O`@+G``#8``#+``\"Z``\"P``!P```3```D``!8``#(\r\nM``#3``#-``\"S``\"#``!N```>``!^``# ``\"D``\"-``!_``!I``!0```P``\"1\r\nM``\"I``\"\\``\"J``\";``!E``!)```J```.```T``\"L``\"O``\"M``\"F``\")``!Z\r\nM``!K``!:```^```I``!J``\"\"``\"?``\">``\"6``\"/``!\\```9```'``!5``\".\r\nM``\"*```X```0```_``!R``\" ``!<```W```L``!F``!#``!6```@```S```\\\r\nM```Z```?```,```=```-````````````````````````````````````````\r\nM````````````````````````````````````````````````````````````\r\nM``````````````````````````````````````````````````````````#\\\r\nM+ME%`````7123E,`0.;89@```!9T15AT4V]F='=AOF@```((241!5'B<8V\" @_\\0P( !F)A96%G9V#DX,:4YN+AY>'GY^+D%\r\nM!#E0)?\\S\"_$(BXB*B4M(\\DH)2?D%A47%R26E9E$=Y1258[C^3D&15=4UM77U#8U.SJWW[10_(IZTQ.W@($E7_+;BD#F\\3WZ*P;-F1H[.WSI'D/29P'!J+__\\?\r\nMESUQV..DR*)3B[:J;SNM?49(V@(N%\\%VEK_#Y=PV^?9=PIE\\85.E(^\")X_]_\r\nMCH.R8>=Y0S,OA&JGFV5T6B\"EF___#TE?7'M)ZO+E*]P[KQ[O0DY20);%M2FL\r\nMUR]>O7B=[09:<@.QF2QDM-S=M2PP4^)_5(\":\"/%(84W7`)A(.MC?YL?R````\r\nM)71%6'1#;VUM96YT`&-L:7 R9VEF('8N,\"XV(&)Y(%EV97,@4&EG=65T-G,[\r\n-O ````!)14Y$KD)@@@``\r\n`\r\nend\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 420, diff --git a/tests/legacy/050.txt b/tests/legacy/050.txt index 7921dcb..8a4c3a9 100644 --- a/tests/legacy/050.txt +++ b/tests/legacy/050.txt @@ -112,6 +112,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== { "headers": { "values": { + "subject": { + "Text": "Die Hasen und die Frösche" + }, "mime_version": { "Text": "1.0" }, @@ -144,9 +147,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "address": "mueller@example.com" } }, - "subject": { - "Text": "Die Hasen und die Frösche" - }, "message_id": { "Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com" }, @@ -161,11 +161,11 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "X-Mailer": { "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" }, - "X-Sender": { - "Text": "dwsauder@pop.example.com (Unverified)" - }, "X-Priority": { "Text": "2 (High)" + }, + "X-Sender": { + "Text": "dwsauder@pop.example.com (Unverified)" } }, "offsets": [ @@ -242,29 +242,27 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== ] }, "html_body": [ - 1 + 0 ], "text_body": [ 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 }, { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"\n\n" - } - }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", @@ -273,9 +271,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "charset": "iso-8859-1" } } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -295,16 +290,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } ] }, - "contents": "\n\"2aa658b6.png\"
\n
\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n\"2aa658c0.png\"
\n" + "contents": "\n\"2aa658b6.png\"
\n
\nDie Hasen und die\nFrösche
\n
\n
Die Hasen klagten einst über\nihre mißliche Lage; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben."
\n
\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.
\n
\n"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir."
\n
\n\"2aa658c0.png\"
\n", + "is_html": true } }, { "Binary": { "headers": { "values": { - "content_id": { - "Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2" - }, "content_disposition": { "ContentType": { "c_type": "inline", @@ -313,6 +306,12 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== } } }, + "content_transfer_encoding": { + "Text": "base64" + }, + "content_id": { + "Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2" + }, "content_type": { "ContentType": { "c_type": "image", @@ -321,9 +320,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "name": "2aa658b6.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -1690,6 +1686,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "Binary": { "headers": { "values": { + "content_type": { + "ContentType": { + "c_type": "image", + "c_subtype": "png", + "attributes": { + "name": "2aa658c0.png" + } + } + }, "content_id": { "Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3" }, @@ -1703,15 +1708,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== "filename": "2aa658c0.png" } } - }, - "content_type": { - "ContentType": { - "c_type": "image", - "c_subtype": "png", - "attributes": { - "name": "2aa658c0.png" - } - } } }, "offsets": [ @@ -3205,14 +3201,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, { "Part": 2 - }, - { - "Part": 3 } ] }, diff --git a/tests/legacy/051.txt b/tests/legacy/051.txt index b1ea45d..b9bf4fa 100644 --- a/tests/legacy/051.txt +++ b/tests/legacy/051.txt @@ -164,15 +164,27 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= { "headers": { "values": { - "message_id": { - "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com" - }, "mime_version": { "Text": "1.0" }, + "message_id": { + "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com" + }, "subject": { "Text": "Die Hasen und die Frösche" }, + "to": { + "Address": { + "name": "Heinz Müller", + "address": "mueller@example.com" + } + }, + "from": { + "Address": { + "name": "Doug Sauder", + "address": "dwsauder@example.com" + } + }, "date": { "DateTime": { "year": 2000, @@ -194,29 +206,17 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "boundary": "=====================_715515186==_" } } - }, - "to": { - "Address": { - "name": "Heinz Müller", - "address": "mueller@example.com" - } - }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "dwsauder@example.com" - } } }, "other_values": { - "X-Mailer": { - "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" + "X-Priority": { + "Text": "2 (High)" }, "X-Sender": { "Text": "dwsauder@pop.example.com (Unverified)" }, - "X-Priority": { - "Text": "2 (High)" + "X-Mailer": { + "Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58" } }, "offsets": [ @@ -296,9 +296,12 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= 1 ], "text_body": [ - 2 + 1 ], "attachments": [ + { + "Attachment": 2 + }, { "Attachment": 3 }, @@ -307,9 +310,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= }, { "Attachment": 5 - }, - { - "Attachment": 6 } ], "parts": [ @@ -321,8 +321,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "c_type": "multipart", "c_subtype": "related", "attributes": { - "boundary": "=====================_715515186==_.REL", - "type": "text/plain" + "type": "text/plain", + "boundary": "=====================_715515186==_.REL" } } } @@ -338,11 +338,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= ] } }, - { - "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"

2aa5e03a.png2aa5e044.png" - } - }, { "Text": { "headers": { @@ -377,26 +372,19 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } ] }, - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa5e03a.png2aa5e044.png" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa5e03a.png2aa5e044.png", + "is_html": false } }, { "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" - }, "content_id": { "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2" }, - "content_disposition": { - "ContentType": { - "c_type": "inline", - "attributes": { - "filename": "2aa5e03a.png" - } - } + "content_transfer_encoding": { + "Text": "base64" }, "content_type": { "ContentType": { @@ -406,6 +394,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "name": "2aa5e03a.png" } } + }, + "content_disposition": { + "ContentType": { + "c_type": "inline", + "attributes": { + "filename": "2aa5e03a.png" + } + } } }, "offsets": [ @@ -1772,8 +1768,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" + "content_id": { + "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3" }, "content_type": { "ContentType": { @@ -1784,8 +1780,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, - "content_id": { - "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3" + "content_transfer_encoding": { + "Text": "base64" }, "content_disposition": { "ContentType": { @@ -3288,13 +3284,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "attachment", - "attributes": { - "filename": "blueball.png" - } - } + "content_transfer_encoding": { + "Text": "base64" }, "content_type": { "ContentType": { @@ -3305,8 +3296,13 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= } } }, - "content_transfer_encoding": { - "Text": "base64" + "content_disposition": { + "ContentType": { + "c_type": "attachment", + "attributes": { + "filename": "blueball.png" + } + } } }, "offsets": [ @@ -4666,6 +4662,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "Binary": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "image", @@ -4682,9 +4681,6 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "filename": "greenball.png" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -6020,23 +6016,23 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= "MultiPart": [ 0, [ + { + "Part": 1 + }, { "Part": 2 }, { "Part": 3 - }, - { - "Part": 4 } ] ] }, { - "Part": 5 + "Part": 4 }, { - "Part": 6 + "Part": 5 } ] }, diff --git a/tests/legacy/052.txt b/tests/legacy/052.txt index 9400f76..2238ca2 100644 --- a/tests/legacy/052.txt +++ b/tests/legacy/052.txt @@ -30,6 +30,12 @@ welche also wohl noch ungl { "headers": { "values": { + "from": { + "Address": { + "name": "Doug Sauder", + "address": "doug@example.com" + } + }, "to": { "Address": { "name": "Heinz M�ller", @@ -52,12 +58,6 @@ welche also wohl noch ungl "tz_minute": 0 } }, - "from": { - "Address": { - "name": "Doug Sauder", - "address": "doug@example.com" - } - }, "message_id": { "Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com" } @@ -66,17 +66,17 @@ welche also wohl noch ungl "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, - "X-Priority": { - "Text": "3 (Normal)" - }, - "X-MimeOLE": { - "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" - }, "X-MSMail-Priority": { "Text": "Normal" }, + "X-Priority": { + "Text": "3 (Normal)" + }, "Importance": { "Text": "Normal" + }, + "X-MimeOLE": { + "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" } }, "offsets": [ @@ -156,22 +156,18 @@ welche also wohl noch ungl 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Fr�sche

Die Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein
Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der
Adler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod
selbst. Auf, la�t uns ein f�r allemal sterben.\"

In einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;
allein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte
eine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste
untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein
wenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,
welche also wohl noch ungl�cklicher sein m�ssen als wir.\"

" - } - }, - { - "Text": { - "contents": "Die Hasen und die Fr�sche\r\n\r\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod\r\nselbst. Auf, la�t uns ein f�r allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\r\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte\r\neine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\r\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\r\n\r\n" + "contents": "Die Hasen und die Fr�sche\r\n\r\nDie Hasen klagten einst �ber ihre mi�liche Lage; \"wir leben\", sprach ein\r\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der\r\nAdler, ja fast aller Raubtiere! Unsere stete Angst ist �rger als der Tod\r\nselbst. Auf, la�t uns ein f�r allemal sterben.\"\r\n\r\nIn einem nahen Teich wollten sie sich nun ers�ufen; sie eilten ihm zu;\r\nallein das au�erordentliche Get�se und ihre wunderbare Gestalt erschreckte\r\neine Menge Fr�sche, die am Ufer sa�en, so sehr, da� sie aufs schnellste\r\nuntertauchten.\r\n\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers�ufen noch ein\r\nwenig aufschieben, denn auch uns f�rchten, wie ihr seht, einige Tiere,\r\nwelche also wohl noch ungl�cklicher sein m�ssen als wir.\"\r\n\r\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 434, diff --git a/tests/legacy/053.txt b/tests/legacy/053.txt index 43691d4..68823d0 100644 --- a/tests/legacy/053.txt +++ b/tests/legacy/053.txt @@ -35,36 +35,21 @@ als wir."=20 { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, - "mime_version": { - "Text": "1.0" - }, - "message_id": { - "Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com" - }, "from": { "Address": { "name": "Doug Sauder", "address": "doug@example.com" } }, + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "to": { "Address": { "name": "Heinz Müller", "address": "mueller@example.com" } }, - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain", - "attributes": { - "charset": "utf-8" - } - } - }, "subject": { "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" }, @@ -80,11 +65,29 @@ als wir."=20 "tz_hour": 4, "tz_minute": 0 } + }, + "mime_version": { + "Text": "1.0" + }, + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain", + "attributes": { + "charset": "utf-8" + } + } + }, + "message_id": { + "Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com" } }, "other_values": { - "X-MimeOLE": { - "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" + "Importance": { + "Text": "Normal" + }, + "X-Priority": { + "Text": "3 (Normal)" }, "X-MSMail-Priority": { "Text": "Normal" @@ -92,11 +95,8 @@ als wir."=20 "X-Mailer": { "Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)" }, - "X-Priority": { - "Text": "3 (Normal)" - }, - "Importance": { - "Text": "Normal" + "X-MimeOLE": { + "Text": "Produced By Microsoft MimeOLE V5.00.2314.1300" } }, "offsets": [ @@ -197,22 +197,18 @@ als wir."=20 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Die Hasen und die Frösche

Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\"

In einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten.

\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\"
" - } - }, - { - "Text": { - "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n" + "contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 579, diff --git a/tests/malformed/001.txt b/tests/malformed/001.txt index 647f8e5..2e1f3fb 100644 --- a/tests/malformed/001.txt +++ b/tests/malformed/001.txt @@ -37,7 +37,7 @@ Content-Type: text/plain 1 ], "text_body": [ - 2 + 1 ], "parts": [ { @@ -66,12 +66,8 @@ Content-Type: text/plain }, { "Text": { - "contents": "Content-Type: text/plain
" - } - }, - { - "Text": { - "contents": "Content-Type: text/plain\n" + "contents": "Content-Type: text/plain\n", + "is_html": false } } ], @@ -80,7 +76,7 @@ Content-Type: text/plain 0, [ { - "Part": 2 + "Part": 1 } ] ] diff --git a/tests/malformed/002.txt b/tests/malformed/002.txt index e87514f..f2cc4c0 100644 --- a/tests/malformed/002.txt +++ b/tests/malformed/002.txt @@ -34,7 +34,8 @@ body "parts": [ { "Text": { - "contents": "body\n" + "contents": "body\n", + "is_html": false } } ], diff --git a/tests/malformed/003.txt b/tests/malformed/003.txt index 5f4aa03..a59b7a6 100644 --- a/tests/malformed/003.txt +++ b/tests/malformed/003.txt @@ -83,7 +83,8 @@ body } ] }, - "contents": "body\n" + "contents": "body\n", + "is_html": false } } ], diff --git a/tests/malformed/004.txt b/tests/malformed/004.txt index f9d2795..137204a 100644 --- a/tests/malformed/004.txt +++ b/tests/malformed/004.txt @@ -40,7 +40,8 @@ body "parts": [ { "Text": { - "contents": "Content-Type: multipart/mixed; boundary=\"a\"\n\n--ac\nContent-Type: text/plain\n\nbody\n" + "contents": "Content-Type: multipart/mixed; boundary=\"a\"\n\n--ac\nContent-Type: text/plain\n\nbody\n", + "is_html": false } } ], diff --git a/tests/malformed/005.txt b/tests/malformed/005.txt index 6c9806d..4d36628 100644 --- a/tests/malformed/005.txt +++ b/tests/malformed/005.txt @@ -40,7 +40,7 @@ body2 1 ], "text_body": [ - 2 + 1 ], "parts": [ { @@ -67,11 +67,6 @@ body2 ] } }, - { - "Text": { - "contents": "body" - } - }, { "Text": { "headers": { @@ -93,7 +88,8 @@ body2 } ] }, - "contents": "body" + "contents": "body", + "is_html": false } } ], @@ -102,7 +98,7 @@ body2 0, [ { - "Part": 2 + "Part": 1 } ] ] diff --git a/tests/malformed/006.txt b/tests/malformed/006.txt index a6ee721..6fe611d 100644 --- a/tests/malformed/006.txt +++ b/tests/malformed/006.txt @@ -83,7 +83,8 @@ body } ] }, - "contents": "body\n" + "contents": "body\n", + "is_html": false } } ], diff --git a/tests/malformed/007.txt b/tests/malformed/007.txt index 3f083bb..1deaf2c 100644 --- a/tests/malformed/007.txt +++ b/tests/malformed/007.txt @@ -76,7 +76,8 @@ Content-Type: text/plain }, { "Text": { - "contents": "--a--\n\n" + "contents": "--a--\n\n", + "is_html": false } } ], diff --git a/tests/malformed/008.txt b/tests/malformed/008.txt index 744d89e..6f5067d 100644 --- a/tests/malformed/008.txt +++ b/tests/malformed/008.txt @@ -87,7 +87,8 @@ body2 } ] }, - "contents": "body\n--ab\nContent-Type: text/html\n\nbody2\n" + "contents": "body\n--ab\nContent-Type: text/html\n\nbody2\n", + "is_html": false } } ], diff --git a/tests/malformed/009.txt b/tests/malformed/009.txt index 0546e46..1887dfb 100644 --- a/tests/malformed/009.txt +++ b/tests/malformed/009.txt @@ -44,11 +44,11 @@ Content-Type: text/plain 1 ], "text_body": [ - 2 + 1 ], "attachments": [ { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ @@ -76,11 +76,6 @@ Content-Type: text/plain ] } }, - { - "Text": { - "contents": "1" - } - }, { "Text": { "headers": { @@ -102,7 +97,8 @@ Content-Type: text/plain } ] }, - "contents": "1" + "contents": "1", + "is_html": false } }, { @@ -126,7 +122,8 @@ Content-Type: text/plain } ] }, - "contents": "22\n--1\nContent-Type: text/plain\n\n333\n" + "contents": "22\n--1\nContent-Type: text/plain\n\n333\n", + "is_html": false } } ], @@ -135,10 +132,10 @@ Content-Type: text/plain 0, [ { - "Part": 2 + "Part": 1 }, { - "Part": 3 + "Part": 2 } ] ] diff --git a/tests/malformed/010.txt b/tests/malformed/010.txt index 768f16e..dc5f815 100644 --- a/tests/malformed/010.txt +++ b/tests/malformed/010.txt @@ -109,22 +109,18 @@ Content-Type: text/plain 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "1
" - } - }, - { - "Text": { - "contents": "1\n" + "contents": "1\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 60, "offset_body": 86, diff --git a/tests/malformed/011.txt b/tests/malformed/011.txt index 0546e46..1887dfb 100644 --- a/tests/malformed/011.txt +++ b/tests/malformed/011.txt @@ -44,11 +44,11 @@ Content-Type: text/plain 1 ], "text_body": [ - 2 + 1 ], "attachments": [ { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ @@ -76,11 +76,6 @@ Content-Type: text/plain ] } }, - { - "Text": { - "contents": "1" - } - }, { "Text": { "headers": { @@ -102,7 +97,8 @@ Content-Type: text/plain } ] }, - "contents": "1" + "contents": "1", + "is_html": false } }, { @@ -126,7 +122,8 @@ Content-Type: text/plain } ] }, - "contents": "22\n--1\nContent-Type: text/plain\n\n333\n" + "contents": "22\n--1\nContent-Type: text/plain\n\n333\n", + "is_html": false } } ], @@ -135,10 +132,10 @@ Content-Type: text/plain 0, [ { - "Part": 2 + "Part": 1 }, { - "Part": 3 + "Part": 2 } ] ] diff --git a/tests/malformed/012.txt b/tests/malformed/012.txt index 7168787..e09e034 100644 --- a/tests/malformed/012.txt +++ b/tests/malformed/012.txt @@ -125,22 +125,18 @@ Content-Type: text/plain 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "1" - } - }, - { - "Text": { - "contents": "1" + "contents": "1", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 128, "offset_body": 154, @@ -197,7 +193,8 @@ Content-Type: text/plain "parts": [ { "Text": { - "contents": "22\n--1\nContent-Type: message/rfc822\n\nContent-Type: text/plain\n\n333\n" + "contents": "22\n--1\nContent-Type: message/rfc822\n\nContent-Type: text/plain\n\n333\n", + "is_html": false } } ], diff --git a/tests/malformed/013.txt b/tests/malformed/013.txt index 79d7c59..ba55454 100644 --- a/tests/malformed/013.txt +++ b/tests/malformed/013.txt @@ -67,22 +67,17 @@ hello, world }, "html_body": [ 0, - 3, - 6, - 9 + 2, + 4, + 6 ], "text_body": [ - 1, + 0, + 2, 4, - 7, - 10 + 6 ], "parts": [ - { - "Text": { - "contents": "hello, world" - } - }, { "Text": { "headers": { @@ -104,7 +99,8 @@ hello, world } ] }, - "contents": "hello, world" + "contents": "hello, world", + "is_html": false } }, { @@ -141,11 +137,6 @@ hello, world ] } }, - { - "Text": { - "contents": "hello, world" - } - }, { "Text": { "headers": { @@ -167,12 +158,16 @@ hello, world } ] }, - "contents": "hello, world" + "contents": "hello, world", + "is_html": false } }, { "Multipart": { "values": { + "mime_version": { + "Text": "abc" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -181,9 +176,6 @@ hello, world "boundary": "1" } } - }, - "mime_version": { - "Text": "abc" } }, "offsets": [ @@ -204,11 +196,6 @@ hello, world ] } }, - { - "Text": { - "contents": "hello, world" - } - }, { "Text": { "headers": { @@ -230,7 +217,8 @@ hello, world } ] }, - "contents": "hello, world" + "contents": "hello, world", + "is_html": false } }, { @@ -264,11 +252,6 @@ hello, world ] } }, - { - "Text": { - "contents": "hello, world" - } - }, { "Text": { "headers": { @@ -290,16 +273,17 @@ hello, world } ] }, - "contents": "hello, world" + "contents": "hello, world", + "is_html": false } } ], "structure": { "MultiPart": [ - 8, + 5, [ { - "Part": 10 + "Part": 6 } ] ] diff --git a/tests/malformed/014.txt b/tests/malformed/014.txt index 6cc3f68..1ff5683 100644 --- a/tests/malformed/014.txt +++ b/tests/malformed/014.txt @@ -34,14 +34,9 @@ hello, world 0 ], "text_body": [ - 1 + 0 ], "parts": [ - { - "Text": { - "contents": "hello, world" - } - }, { "Text": { "headers": { @@ -63,12 +58,13 @@ hello, world } ] }, - "contents": "hello, world" + "contents": "hello, world", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 45, diff --git a/tests/malformed/015.txt b/tests/malformed/015.txt index 1fd8491..0401a85 100644 --- a/tests/malformed/015.txt +++ b/tests/malformed/015.txt @@ -28,17 +28,20 @@ invalid { "headers": { "values": { - "return_path": { - "Text": "test@example.org" + "from": { + "Address": { + "name": "Test User", + "address": "test@example.org" + } }, "content_type": { "ContentType": { "c_type": "multipart", "c_subtype": "signed", "attributes": { + "boundary": "=-GNQXLhuj24Pl1aCkk4/d", "protocol": "application/pgp-signature", - "micalg": "pgp-sha1", - "boundary": "=-GNQXLhuj24Pl1aCkk4/d" + "micalg": "pgp-sha1" } } }, @@ -48,6 +51,18 @@ invalid "address": "test2@example.org" } }, + "subject": { + "Text": "Hello world" + }, + "message_id": { + "Text": "1.2.3.4@example" + }, + "return_path": { + "Text": "test@example.org" + }, + "mime_version": { + "Text": "1.0" + }, "date": { "DateTime": { "year": 2007, @@ -60,21 +75,6 @@ invalid "tz_hour": 3, "tz_minute": 0 } - }, - "message_id": { - "Text": "1.2.3.4@example" - }, - "mime_version": { - "Text": "1.0" - }, - "from": { - "Address": { - "name": "Test User", - "address": "test@example.org" - } - }, - "subject": { - "Text": "Hello world" } }, "offsets": [ @@ -140,31 +140,26 @@ invalid 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 } ], "parts": [ - { - "Text": { - "contents": "There was a day
a happy day
" - } - }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "quoted-printable" + }, "content_type": { "ContentType": { "c_type": "text", "c_subtype": "plain" } - }, - "content_transfer_encoding": { - "Text": "quoted-printable" } }, "offsets": [ @@ -184,7 +179,8 @@ invalid } ] }, - "contents": "There was a day \na happy day\n" + "contents": "There was a day \na happy day\n", + "is_html": false } }, { @@ -227,10 +223,10 @@ invalid "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/malformed/016.txt b/tests/malformed/016.txt index 276ab0a..ab3425f 100644 --- a/tests/malformed/016.txt +++ b/tests/malformed/016.txt @@ -51,11 +51,11 @@ Content-Type: text/plain 2 ], "text_body": [ - 3 + 2 ], "attachments": [ { - "Attachment": 4 + "Attachment": 3 } ], "parts": [ @@ -107,11 +107,6 @@ Content-Type: text/plain ] } }, - { - "Text": { - "contents": "1
--1234567890123456789012345678901234567890123456789012345678901234567890123456789012
Content-Type: text/plain

22
--123456789012345678901234567890123456789012345678901234567890123456789012345678901
Content-Type: text/plain

333" - } - }, { "Text": { "headers": { @@ -133,7 +128,8 @@ Content-Type: text/plain } ] }, - "contents": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333" + "contents": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333", + "is_html": false } }, { @@ -157,7 +153,8 @@ Content-Type: text/plain } ] }, - "contents": "4444\n" + "contents": "4444\n", + "is_html": false } } ], @@ -166,10 +163,10 @@ Content-Type: text/plain 1, [ { - "Part": 3 + "Part": 2 }, { - "Part": 4 + "Part": 3 } ] ] diff --git a/tests/rfc/000.txt b/tests/rfc/000.txt index ceaf4ff..55bd3ea 100644 --- a/tests/rfc/000.txt +++ b/tests/rfc/000.txt @@ -75,33 +75,6 @@ Content-Transfer-Encoding: Quoted-printable { "headers": { "values": { - "from": { - "Address": { - "name": "Nathaniel Borenstein", - "address": "nsb@nsb.fv.com" - } - }, - "mime_version": { - "Text": "1.0" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "unique-boundary-1" - } - } - }, - "subject": { - "Text": "A multipart example" - }, - "to": { - "Address": { - "name": "Ned Freed", - "address": "ned@innosoft.com" - } - }, "date": { "DateTime": { "year": 1994, @@ -114,6 +87,33 @@ Content-Transfer-Encoding: Quoted-printable "tz_hour": 7, "tz_minute": 0 } + }, + "to": { + "Address": { + "name": "Ned Freed", + "address": "ned@innosoft.com" + } + }, + "mime_version": { + "Text": "1.0" + }, + "subject": { + "Text": "A multipart example" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "unique-boundary-1" + } + } + }, + "from": { + "Address": { + "name": "Nathaniel Borenstein", + "address": "nsb@nsb.fv.com" + } } }, "offsets": [ @@ -163,40 +163,31 @@ Content-Transfer-Encoding: Quoted-printable }, "html_body": [ 0, - 2 + 1 ], "text_body": [ - 1, - 3 + 0, + 1 ], "attachments": [ + { + "Attachment": 3 + }, + { + "Attachment": 4 + }, { "Attachment": 5 }, - { - "Attachment": 6 - }, { "Attachment": 7 - }, - { - "Attachment": 9 } ], "parts": [ { "Text": { - "contents": "... Some text appears here ...

[Note that the blank between the boundary and the start
of the text in this part means no header fields were
given and this is text in the US-ASCII character set.
It could have been done with explicit typing as in the
next part.]
" - } - }, - { - "Text": { - "contents": "... Some text appears here ...\n\n[Note that the blank between the boundary and the start\nof the text in this part means no header fields were\ngiven and this is text in the US-ASCII character set.\nIt could have been done with explicit typing as in the\nnext part.]\n" - } - }, - { - "Text": { - "contents": "This could have been part of the previous part, but
illustrates explicit versus implicit typing of body
parts.
" + "contents": "... Some text appears here ...\n\n[Note that the blank between the boundary and the start\nof the text in this part means no header fields were\ngiven and this is text in the US-ASCII character set.\nIt could have been done with explicit typing as in the\nnext part.]\n", + "is_html": false } }, { @@ -223,7 +214,8 @@ Content-Transfer-Encoding: Quoted-printable } ] }, - "contents": "This could have been part of the previous part, but\nillustrates explicit versus implicit typing of body\nparts.\n" + "contents": "This could have been part of the previous part, but\nillustrates explicit versus implicit typing of body\nparts.\n", + "is_html": false } }, { @@ -281,7 +273,8 @@ Content-Transfer-Encoding: Quoted-printable } ] }, - "contents": "... base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n" + "contents": "... base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n", + "is_html": false } }, { @@ -315,7 +308,8 @@ Content-Transfer-Encoding: Quoted-printable } ] }, - "contents": "... base64-encoded image data goes here ...\n" + "contents": "... base64-encoded image data goes here ...\n", + "is_html": false } }, { @@ -339,7 +333,8 @@ Content-Transfer-Encoding: Quoted-printable } ] }, - "contents": "This is enriched.\nas defined in RFC 1896\n\nIsn't it\ncool?\n" + "contents": "This is enriched.\nas defined in RFC 1896\n\nIsn't it\ncool?\n", + "is_html": false } }, { @@ -367,11 +362,6 @@ Content-Transfer-Encoding: Quoted-printable "Message": { "headers": { "values": { - "to": { - "Address": { - "name": "address in US-ASCII" - } - }, "content_type": { "ContentType": { "c_type": "text", @@ -381,16 +371,21 @@ Content-Transfer-Encoding: Quoted-printable } } }, - "subject": { - "Text": "(subject in US-ASCII)" - }, - "content_transfer_encoding": { - "Text": "Quoted-printable" - }, "from": { "Address": { "name": "mailbox in US-ASCII" } + }, + "to": { + "Address": { + "name": "address in US-ASCII" + } + }, + "content_transfer_encoding": { + "Text": "Quoted-printable" + }, + "subject": { + "Text": "(subject in US-ASCII)" } }, "offsets": [ @@ -435,22 +430,18 @@ Content-Transfer-Encoding: Quoted-printable 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "... Additional text in ISO-8859-1 goes here ...
" - } - }, - { - "Text": { - "contents": "... Additional text in ISO-8859-1 goes here ...\n" + "contents": "... Additional text in ISO-8859-1 goes here ...\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 1607, "offset_body": 1782, @@ -460,30 +451,30 @@ Content-Transfer-Encoding: Quoted-printable ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, - { - "Part": 3 - }, { "MultiPart": [ - 4, + 2, [ { - "Part": 5 + "Part": 3 }, { - "Part": 6 + "Part": 4 } ] ] }, { - "Part": 7 + "Part": 5 }, { - "Part": 8 + "Part": 6 } ] }, diff --git a/tests/rfc/001.txt b/tests/rfc/001.txt index b590a51..f4f116f 100644 --- a/tests/rfc/001.txt +++ b/tests/rfc/001.txt @@ -43,25 +43,12 @@ get RFC-MIME.DOC { "headers": { "values": { - "message_id": { - "Text": "id1@host.com" - }, - "to": { - "Address": { - "name": "Someone" - } - }, - "subject": { - "Text": "whatever" - }, - "from": { - "Address": { - "name": "Whomever" - } - }, "mime_version": { "Text": "1.0" }, + "message_id": { + "Text": "id1@host.com" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -73,6 +60,19 @@ get RFC-MIME.DOC }, "content_id": { "Text": "id001@guppylake.bellcore.com" + }, + "subject": { + "Text": "whatever" + }, + "to": { + "Address": { + "name": "Someone" + } + }, + "from": { + "Address": { + "name": "Whomever" + } } }, "offsets": [ @@ -155,12 +155,12 @@ get RFC-MIME.DOC "c_type": "message", "c_subtype": "external-body", "attributes": { - "access-type": "ANON-FTP", - "directory": "pub", "name": "BodyFormats.ps", - "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)", + "site": "thumper.bellcore.com", "mode": "image", - "site": "thumper.bellcore.com" + "directory": "pub", + "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)", + "access-type": "ANON-FTP" } } } @@ -267,10 +267,10 @@ get RFC-MIME.DOC "c_type": "message", "c_subtype": "external-body", "attributes": { - "access-type": "local-file", + "site": "thumper.bellcore.com", "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)", - "name": "/u/nsb/writing/rfcs/RFC-MIME.ps", - "site": "thumper.bellcore.com" + "access-type": "local-file", + "name": "/u/nsb/writing/rfcs/RFC-MIME.ps" } } } @@ -377,9 +377,9 @@ get RFC-MIME.DOC "c_type": "message", "c_subtype": "external-body", "attributes": { - "access-type": "mail-server", "server": "listserv@bogus.bitnet", - "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)" + "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)", + "access-type": "mail-server" } } } diff --git a/tests/rfc/002.txt b/tests/rfc/002.txt index daccb06..ebdf867 100644 --- a/tests/rfc/002.txt +++ b/tests/rfc/002.txt @@ -81,6 +81,9 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz "address": "vice-president@whitehouse.gov" } }, + "subject": { + "Text": "[Fwd: Map of Argentina with Description]" + }, "to": { "Address": { "name": "White House Transportation Coordinator", @@ -95,9 +98,6 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz "boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872" } } - }, - "subject": { - "Text": "[Fwd: Map of Argentina with Description]" } }, "offsets": [ @@ -135,19 +135,14 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 3 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "Fred,

Fire up Air Force One! We're going South!

Thanks,
Al" - } - }, { "Text": { "headers": { @@ -182,7 +177,8 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz } ] }, - "contents": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl" + "contents": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl", + "is_html": false } }, { @@ -232,15 +228,6 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz "Message": { "headers": { "values": { - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "DC8------------DC8638F443D87A7F0726DEF7" - } - } - }, "to": { "Address": { "name": "A1 Gore (The Enforcer)", @@ -253,6 +240,19 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz "address": "president@whitehouse.gov" } }, + "return_path": { + "Text": "president@whitehouse.gov" + }, + "received": { + "Collection": [ + { + "Text": "from mailhost.whitehouse.gov ([192.168.51.200])\n by heartbeat.whitehouse.gov (8.8.8/8.8.8) with ESMTP id SAA22453\n for ;\n Mon, 13 Aug 1998 l8:14:23 +1000" + }, + { + "Text": "from the_big_box.whitehouse.gov ([192.168.51.50])\n by mailhost.whitehouse.gov (8.8.8/8.8.7) with ESMTP id RAA20366\n for vice-president@whitehouse.gov; Mon, 13 Aug 1998 17:42:41 +1000" + } + ] + }, "date": { "DateTime": { "year": 1998, @@ -266,27 +266,23 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz "tz_minute": 0 } }, - "return_path": { - "Text": "president@whitehouse.gov" - }, "mime_version": { "Text": "1.0" }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "DC8------------DC8638F443D87A7F0726DEF7" + } + } + }, "message_id": { "Text": "199804130742.RAA20366@mai1host.whitehouse.gov" }, "subject": { "Text": "Map of Argentina with Description" - }, - "received": { - "Collection": [ - { - "Text": "from mailhost.whitehouse.gov ([192.168.51.200])\n by heartbeat.whitehouse.gov (8.8.8/8.8.8) with ESMTP id SAA22453\n for ;\n Mon, 13 Aug 1998 l8:14:23 +1000" - }, - { - "Text": "from the_big_box.whitehouse.gov ([192.168.51.50])\n by mailhost.whitehouse.gov (8.8.8/8.8.7) with ESMTP id RAA20366\n for vice-president@whitehouse.gov; Mon, 13 Aug 1998 17:42:41 +1000" - } - ] } }, "offsets": [ @@ -364,23 +360,18 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz }, "html_body": [ 0, - 2 + 1 ], "text_body": [ - 1, - 2 + 0, + 1 ], "attachments": [ { - "Inline": 2 + "Inline": 1 } ], "parts": [ - { - "Text": { - "contents": "Hi A1,

I finally figured out this MIME thing. Pretty cool. I'll send you
some sax music in .au files next week!

Anyway, the attached image is really too small to get a good look at
Argentina. Try this for a much better map:

http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm

Then again, shouldn't the CIA have something like that?

Bill" - } - }, { "Text": { "headers": { @@ -415,30 +406,31 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz } ] }, - "contents": "Hi A1,\n\nI finally figured out this MIME thing. Pretty cool. I'll send you\nsome sax music in .au files next week!\n\nAnyway, the attached image is really too small to get a good look at\nArgentina. Try this for a much better map:\n\n http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm\n\nThen again, shouldn't the CIA have something like that?\n\nBill" + "contents": "Hi A1,\n\nI finally figured out this MIME thing. Pretty cool. I'll send you\nsome sax music in .au files next week!\n\nAnyway, the attached image is really too small to get a good look at\nArgentina. Try this for a much better map:\n\n http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm\n\nThen again, shouldn't the CIA have something like that?\n\nBill", + "is_html": false } }, { "Binary": { "headers": { "values": { - "content_type": { + "content_disposition": { "ContentType": { - "c_type": "image", - "c_subtype": "gif", + "c_type": "inline", "attributes": { - "name": "map_of_Argentina.gif" + "fi1ename": "map_of_Argentina.gif" } } }, "content_transfer_encoding": { "Text": "base64" }, - "content_disposition": { + "content_type": { "ContentType": { - "c_type": "inline", + "c_type": "image", + "c_subtype": "gif", "attributes": { - "fi1ename": "map_of_Argentina.gif" + "name": "map_of_Argentina.gif" } } } @@ -763,10 +755,10 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, @@ -779,10 +771,10 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/rfc/003.txt b/tests/rfc/003.txt index b70cb62..932d113 100644 --- a/tests/rfc/003.txt +++ b/tests/rfc/003.txt @@ -27,12 +27,21 @@ Content-Type: application/x-whatever { "headers": { "values": { + "from": { + "Address": { + "name": "Nathaniel Borenstein", + "address": "nsb@bellcore.com" + } + }, "to": { "Address": { "name": "Ned Freed", "address": "ned@innosoft.com" } }, + "subject": { + "Text": "Formatted text mail" + }, "date": { "DateTime": { "year": 1993, @@ -46,18 +55,9 @@ Content-Type: application/x-whatever "tz_minute": 0 } }, - "from": { - "Address": { - "name": "Nathaniel Borenstein", - "address": "nsb@bellcore.com" - } - }, "mime_version": { "Text": "1.0" }, - "subject": { - "Text": "Formatted text mail" - }, "content_type": { "ContentType": { "c_type": "multipart", @@ -114,7 +114,7 @@ Content-Type: application/x-whatever ] }, "html_body": [ - 3 + 0 ], "text_body": [ 0 @@ -152,7 +152,8 @@ Content-Type: application/x-whatever } ] }, - "contents": "... plain text version of message goes here ...\n" + "contents": "... plain text version of message goes here ...\n", + "is_html": false } }, { @@ -176,7 +177,8 @@ Content-Type: application/x-whatever } ] }, - "contents": "... RFC 1896 text/enriched version of same message\n goes here ...\n" + "contents": "... RFC 1896 text/enriched version of same message\n goes here ...\n", + "is_html": false } }, { @@ -254,11 +256,6 @@ Content-Type: application/x-whatever 10 ] } - }, - { - "Text": { - "contents": "... plain text version of message goes here ...
" - } } ], "structure": { diff --git a/tests/rfc/004.txt b/tests/rfc/004.txt index f38605d..c48fb5e 100644 --- a/tests/rfc/004.txt +++ b/tests/rfc/004.txt @@ -38,8 +38,27 @@ Subject: my different opinion { "headers": { "values": { - "mime_version": { - "Text": "1.0" + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "---- main boundary ----" + } + } + }, + "subject": { + "Text": "Internet Digest, volume 42" + }, + "from": { + "Address": { + "name": "Moderator-Address" + } + }, + "to": { + "Address": { + "name": "Recipient-List" + } }, "date": { "DateTime": { @@ -54,27 +73,8 @@ Subject: my different opinion "tz_minute": 0 } }, - "to": { - "Address": { - "name": "Recipient-List" - } - }, - "subject": { - "Text": "Internet Digest, volume 42" - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "---- main boundary ----" - } - } - }, - "from": { - "Address": { - "name": "Moderator-Address" - } + "mime_version": { + "Text": "1.0" } }, "offsets": [ @@ -126,25 +126,21 @@ Subject: my different opinion 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 4 + "Attachment": 3 }, { - "Attachment": 6 + "Attachment": 5 } ], "parts": [ { "Text": { - "contents": "...Introductory text or table of contents...
" - } - }, - { - "Text": { - "contents": "...Introductory text or table of contents...\n" + "contents": "...Introductory text or table of contents...\n", + "is_html": false } }, { @@ -192,9 +188,6 @@ Subject: my different opinion "name": "someone-else" } }, - "subject": { - "Text": "my opinion" - }, "date": { "DateTime": { "year": 1993, @@ -207,6 +200,9 @@ Subject: my different opinion "tz_hour": 2, "tz_minute": 0 } + }, + "subject": { + "Text": "my opinion" } }, "offsets": [ @@ -237,22 +233,18 @@ Subject: my different opinion 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "...body goes here ...
" - } - }, - { - "Text": { - "contents": "...body goes here ...\n" + "contents": "...body goes here ...\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 418, "offset_body": 496, @@ -278,11 +270,6 @@ Subject: my different opinion "subject": { "Text": "my different opinion" }, - "from": { - "Address": { - "name": "someone-else-again" - } - }, "date": { "DateTime": { "year": 1993, @@ -295,6 +282,11 @@ Subject: my different opinion "tz_hour": 5, "tz_minute": 0 } + }, + "from": { + "Address": { + "name": "someone-else-again" + } } }, "offsets": [ @@ -325,22 +317,18 @@ Subject: my different opinion 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "... another body goes here ...
" - } - }, - { - "Text": { - "contents": "... another body goes here ...\n" + "contents": "... another body goes here ...\n", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 545, "offset_body": 639, @@ -351,17 +339,17 @@ Subject: my different opinion "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { "MultiPart": [ - 2, + 1, [ { - "Part": 3 + "Part": 2 }, { - "Part": 5 + "Part": 4 } ] ] diff --git a/tests/rfc/005.txt b/tests/rfc/005.txt index f259ba4..0518438 100644 --- a/tests/rfc/005.txt +++ b/tests/rfc/005.txt @@ -27,6 +27,33 @@ This is the epilogue. It is also to be ignored. { "headers": { "values": { + "mime_version": { + "Text": "1.0" + }, + "to": { + "Address": { + "name": "Ned Freed", + "address": "ned@innosoft.com" + } + }, + "from": { + "Address": { + "name": "Nathaniel Borenstein", + "address": "nsb@bellcore.com" + } + }, + "subject": { + "Text": "Sample message" + }, + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "simple boundary" + } + } + }, "date": { "DateTime": { "year": 1993, @@ -39,33 +66,6 @@ This is the epilogue. It is also to be ignored. "tz_hour": 8, "tz_minute": 0 } - }, - "subject": { - "Text": "Sample message" - }, - "mime_version": { - "Text": "1.0" - }, - "from": { - "Address": { - "name": "Nathaniel Borenstein", - "address": "nsb@bellcore.com" - } - }, - "to": { - "Address": { - "name": "Ned Freed", - "address": "ned@innosoft.com" - } - }, - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "simple boundary" - } - } } }, "offsets": [ @@ -115,26 +115,17 @@ This is the epilogue. It is also to be ignored. }, "html_body": [ 0, - 2 + 1 ], "text_body": [ - 1, - 3 + 0, + 1 ], "parts": [ { "Text": { - "contents": "This is implicitly typed plain US-ASCII text.
It does NOT end with a linebreak." - } - }, - { - "Text": { - "contents": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak." - } - }, - { - "Text": { - "contents": "This is explicitly typed plain US-ASCII text.
It DOES end with a linebreak.
" + "contents": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak.", + "is_html": false } }, { @@ -161,17 +152,18 @@ This is the epilogue. It is also to be ignored. } ] }, - "contents": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n" + "contents": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n", + "is_html": false } } ], "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 3 + "Part": 1 } ] }, diff --git a/tests/rfc/006.txt b/tests/rfc/006.txt index 72c8ace..b413321 100644 --- a/tests/rfc/006.txt +++ b/tests/rfc/006.txt @@ -25,6 +25,9 @@ Content-Disposition: inline { "headers": { "values": { + "subject": { + "Text": "Multipart Email Example" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -34,18 +37,15 @@ Content-Disposition: inline } } }, - "to": { - "Address": { - "address": "recipient@example.com" - } - }, - "subject": { - "Text": "Multipart Email Example" - }, "from": { "Address": { "address": "sender@example.com" } + }, + "to": { + "Address": { + "address": "recipient@example.com" + } } }, "offsets": [ @@ -93,6 +93,11 @@ Content-Disposition: inline "content_transfer_encoding": { "Text": "quoted-printable" }, + "content_disposition": { + "ContentType": { + "c_type": "inline" + } + }, "content_type": { "ContentType": { "c_type": "text", @@ -101,11 +106,6 @@ Content-Disposition: inline "charset": "utf-8" } } - }, - "content_disposition": { - "ContentType": { - "c_type": "inline" - } } }, "offsets": [ @@ -132,7 +132,8 @@ Content-Disposition: inline } ] }, - "contents": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n" + "contents": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n", + "is_html": false } }, { @@ -181,7 +182,8 @@ Content-Disposition: inline } ] }, - "contents": "

This is the HTML Section!

\n

This is what displays in most modern email clients

\n" + "contents": "

This is the HTML Section!

\n

This is what displays in most modern email clients

\n", + "is_html": true } } ], diff --git a/tests/rfc/007.txt b/tests/rfc/007.txt index ea961d4..26ada3d 100644 --- a/tests/rfc/007.txt +++ b/tests/rfc/007.txt @@ -75,6 +75,9 @@ K { "headers": { "values": { + "subject": { + "Text": "RFC 8621 Section 4.1.4 test" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -83,9 +86,6 @@ K "boundary": "1" } } - }, - "subject": { - "Text": "RFC 8621 Section 4.1.4 test" } }, "offsets": [ @@ -107,19 +107,22 @@ K }, "html_body": [ 0, - 9, - 15 + 8, + 14 ], "text_body": [ - 1, + 0, + 4, 5, 6, - 7, - 16 + 14 ], "attachments": [ { - "Inline": 6 + "Inline": 5 + }, + { + "Attachment": 9 }, { "Attachment": 10 @@ -128,18 +131,10 @@ K "Attachment": 11 }, { - "Attachment": 12 - }, - { - "Attachment": 14 + "Attachment": 13 } ], "parts": [ - { - "Text": { - "contents": "A" - } - }, { "Text": { "headers": { @@ -173,7 +168,8 @@ K } ] }, - "contents": "A" + "contents": "A", + "is_html": false } }, { @@ -252,16 +248,16 @@ K "Text": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "inline" - } - }, "content_type": { "ContentType": { "c_type": "text", "c_subtype": "plain" } + }, + "content_disposition": { + "ContentType": { + "c_type": "inline" + } } }, "offsets": [ @@ -281,7 +277,8 @@ K } ] }, - "contents": "B" + "contents": "B", + "is_html": false } }, { @@ -355,7 +352,8 @@ K } ] }, - "contents": "D" + "contents": "D", + "is_html": false } }, { @@ -403,7 +401,8 @@ K } ] }, - "contents": "E" + "contents": "E", + "is_html": true } }, { @@ -436,16 +435,16 @@ K "Binary": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "attachment" - } - }, "content_type": { "ContentType": { "c_type": "image", "c_subtype": "jpeg" } + }, + "content_disposition": { + "ContentType": { + "c_type": "attachment" + } } }, "offsets": [ @@ -539,47 +538,38 @@ K 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "J" - } - }, - { - "Text": { - "contents": "J" + "contents": "J", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 781, "offset_body": 793, "offset_end": 798 } }, - { - "Text": { - "contents": "K" - } - }, { "Text": { "headers": { "values": { - "content_disposition": { - "ContentType": { - "c_type": "inline" - } - }, "content_type": { "ContentType": { "c_type": "text", "c_subtype": "plain" } + }, + "content_disposition": { + "ContentType": { + "c_type": "inline" + } } }, "offsets": [ @@ -599,48 +589,49 @@ K } ] }, - "contents": "K" + "contents": "K", + "is_html": false } } ], "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { "MultiPart": [ - 2, + 1, [ { "MultiPart": [ - 3, + 2, [ { "MultiPart": [ - 4, + 3, [ + { + "Part": 4 + }, { "Part": 5 }, { "Part": 6 - }, - { - "Part": 7 } ] ] }, { "MultiPart": [ - 8, + 7, [ { - "Part": 9 + "Part": 8 }, { - "Part": 10 + "Part": 9 } ] ] @@ -648,20 +639,20 @@ K ] ] }, + { + "Part": 10 + }, { "Part": 11 }, { "Part": 12 - }, - { - "Part": 13 } ] ] }, { - "Part": 16 + "Part": 14 } ] }, diff --git a/tests/thirdparty/000.txt b/tests/thirdparty/000.txt index 8d294b1..0ff781c 100644 --- a/tests/thirdparty/000.txt +++ b/tests/thirdparty/000.txt @@ -53,8 +53,8 @@ ZWg= ] }, "html_body": [ - 2, - 3 + 0, + 1 ], "text_body": [ 0, @@ -92,21 +92,22 @@ ZWg= } ] }, - "contents": "we have\ra lot \nof \u0000binary stuff in here\nb adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a" + "contents": "we have\ra lot \nof \u0000binary stuff in here\nb adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "base64" - }, "content_type": { "ContentType": { "c_type": "text", "c_subtype": "plain" } + }, + "content_transfer_encoding": { + "Text": "base64" } }, "offsets": [ @@ -126,17 +127,8 @@ ZWg= } ] }, - "contents": "eh" - } - }, - { - "Text": { - "contents": "we havea lot
of \u0000binary stuff in here
b adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a" - } - }, - { - "Text": { - "contents": "eh" + "contents": "eh", + "is_html": false } } ], diff --git a/tests/thirdparty/001.txt b/tests/thirdparty/001.txt index bf3fadc..c000a25 100644 --- a/tests/thirdparty/001.txt +++ b/tests/thirdparty/001.txt @@ -27,6 +27,9 @@ hello world { "headers": { "values": { + "mime_version": { + "Text": "1.0" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -35,9 +38,6 @@ hello world "boundary": "bound" } } - }, - "mime_version": { - "Text": "1.0" } }, "offsets": [ @@ -58,9 +58,9 @@ hello world ] }, "html_body": [ - 3, - 4, - 5 + 0, + 1, + 2 ], "text_body": [ 0, @@ -72,14 +72,14 @@ hello world "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "binary" - }, "content_type": { "ContentType": { "c_type": "text", "c_subtype": "plain" } + }, + "content_transfer_encoding": { + "Text": "binary" } }, "offsets": [ @@ -99,7 +99,8 @@ hello world } ] }, - "contents": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz\r\naWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk\r\nZ2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=\r" + "contents": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz\r\naWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk\r\nZ2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=\r", + "is_html": false } }, { @@ -133,7 +134,8 @@ hello world } ] }, - "contents": "ZWg=" + "contents": "ZWg=", + "is_html": false } }, { @@ -157,22 +159,8 @@ hello world } ] }, - "contents": "hello world\r\n\r" - } - }, - { - "Text": { - "contents": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz
aWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk
Z2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=" - } - }, - { - "Text": { - "contents": "ZWg=" - } - }, - { - "Text": { - "contents": "hello world
" + "contents": "hello world\r\n\r", + "is_html": false } } ], diff --git a/tests/thirdparty/002.txt b/tests/thirdparty/002.txt index eb29a09..2821f6d 100644 --- a/tests/thirdparty/002.txt +++ b/tests/thirdparty/002.txt @@ -44,23 +44,18 @@ Content-Type: text/plain; charset=utf-8 }, "html_body": [ 0, - 2 + 1 ], "text_body": [ - 1, - 3 + 0, + 1 ], "attachments": [ { - "Attachment": 4 + "Attachment": 2 } ], "parts": [ - { - "Text": { - "contents": "päivää
" - } - }, { "Text": { "headers": { @@ -95,18 +90,17 @@ Content-Type: text/plain; charset=utf-8 } ] }, - "contents": "päivää\n" - } - }, - { - "Text": { - "contents": "yötä vaan.
�\t�" + "contents": "päivää\n", + "is_html": false } }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "text", @@ -115,9 +109,6 @@ Content-Type: text/plain; charset=utf-8 "charset": "utf-8" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -137,7 +128,8 @@ Content-Type: text/plain; charset=utf-8 } ] }, - "contents": "yötä vaan.\n�\t�" + "contents": "yötä vaan.\n�\t�", + "is_html": false } }, { @@ -174,20 +166,21 @@ Content-Type: text/plain; charset=utf-8 } ] }, - "contents": "?garbage" + "contents": "?garbage", + "is_html": false } } ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, { - "Part": 3 - }, - { - "Part": 4 + "Part": 2 } ] }, diff --git a/tests/thirdparty/003.txt b/tests/thirdparty/003.txt index 8f50622..a3a6f64 100644 --- a/tests/thirdparty/003.txt +++ b/tests/thirdparty/003.txt @@ -37,9 +37,6 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== { "headers": { "values": { - "mime_version": { - "Text": "1.0" - }, "content_type": { "ContentType": { "c_type": "multipart", @@ -48,6 +45,9 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== "boundary": "1" } } + }, + "mime_version": { + "Text": "1.0" } }, "offsets": [ @@ -69,31 +69,23 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== }, "html_body": [ 0, + 1, 2, - 4, - 6, - 8 + 3, + 4 ], "text_body": [ + 0, 1, + 2, 3, - 5, - 7, - 9 + 4 ], "parts": [ - { - "Text": { - "contents": "Move black king to queen's bishop
" - } - }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "7bit" - }, "content_type": { "ContentType": { "c_type": "text", @@ -102,6 +94,9 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== "charset": "us-ascii" } } + }, + "content_transfer_encoding": { + "Text": "7bit" } }, "offsets": [ @@ -121,12 +116,8 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== } ] }, - "contents": "Move black king to queen's bishop\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move black king to queen's bishop\n", + "is_html": false } }, { @@ -163,21 +154,14 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== } ] }, - "contents": "Move ♚ to ♛'s ♝\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "8bit" - }, "content_type": { "ContentType": { "c_type": "text", @@ -186,6 +170,9 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== "charset": "UTF-8" } } + }, + "content_transfer_encoding": { + "Text": "8bit" } }, "offsets": [ @@ -205,21 +192,14 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== } ] }, - "contents": "Move ♚ to ♛'s ♝\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "quoted-printable" - }, "content_type": { "ContentType": { "c_type": "text", @@ -228,6 +208,9 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== "charset": "UTF-8" } } + }, + "content_transfer_encoding": { + "Text": "quoted-printable" } }, "offsets": [ @@ -247,18 +230,17 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== } ] }, - "contents": "Move ♚ to ♛'s ♝\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "base64" + }, "content_type": { "ContentType": { "c_type": "text", @@ -267,9 +249,6 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== "charset": "UTF-8" } } - }, - "content_transfer_encoding": { - "Text": "base64" } }, "offsets": [ @@ -289,26 +268,27 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg== } ] }, - "contents": "Move ♚ to ♛'s ♝\n" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } } ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, + { + "Part": 2 + }, { "Part": 3 }, { - "Part": 5 - }, - { - "Part": 7 - }, - { - "Part": 9 + "Part": 4 } ] }, diff --git a/tests/thirdparty/004.txt b/tests/thirdparty/004.txt index 485398c..c5a612e 100644 --- a/tests/thirdparty/004.txt +++ b/tests/thirdparty/004.txt @@ -43,6 +43,9 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D { "headers": { "values": { + "mime_version": { + "Text": "1.0" + }, "content_type": { "ContentType": { "c_type": "multipart", @@ -51,9 +54,6 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D "boundary": "1" } } - }, - "mime_version": { - "Text": "1.0" } }, "offsets": [ @@ -75,30 +75,28 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D }, "html_body": [ 0, + 1, 2, + 3, 4, - 6, - 8, - 10 + 5 ], "text_body": [ + 0, 1, + 2, 3, - 5, - 7, - 9, - 11 + 4, + 5 ], "parts": [ - { - "Text": { - "contents": "Move black king to queen's bishop
" - } - }, { "Text": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "6bit" + }, "content_type": { "ContentType": { "c_type": "text", @@ -107,9 +105,6 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D "charset": "UTF-8" } } - }, - "content_transfer_encoding": { - "Text": "6bit" } }, "offsets": [ @@ -129,21 +124,14 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D } ] }, - "contents": "Move black king to queen's bishop\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move black king to queen's bishop\n", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "7bits" - }, "content_type": { "ContentType": { "c_type": "text", @@ -152,6 +140,9 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D "charset": "UTF-8" } } + }, + "content_transfer_encoding": { + "Text": "7bits" } }, "offsets": [ @@ -171,12 +162,8 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D } ] }, - "contents": "Move ♚ to ♛'s ♝\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } }, { @@ -213,21 +200,14 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D } ] }, - "contents": "Move ♚ to ♛'s ♝\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "7-bit" - }, "content_type": { "ContentType": { "c_type": "text", @@ -236,6 +216,9 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D "charset": "UTF-8" } } + }, + "content_transfer_encoding": { + "Text": "7-bit" } }, "offsets": [ @@ -255,12 +238,8 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D } ] }, - "contents": "Move ♚ to ♛'s ♝\n" - } - }, - { - "Text": { - "contents": "Move ♚ to ♛'s ♝
" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } }, { @@ -297,12 +276,8 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D } ] }, - "contents": "Move ♚ to ♛'s ♝\n" - } - }, - { - "Text": { - "contents": "Move =E2=99=9A to =E2=99=9B's =E2=99=9D
" + "contents": "Move ♚ to ♛'s ♝\n", + "is_html": false } }, { @@ -336,29 +311,30 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D } ] }, - "contents": "Move =E2=99=9A to =E2=99=9B's =E2=99=9D\n" + "contents": "Move =E2=99=9A to =E2=99=9B's =E2=99=9D\n", + "is_html": false } } ], "structure": { "List": [ + { + "Part": 0 + }, { "Part": 1 }, + { + "Part": 2 + }, { "Part": 3 }, + { + "Part": 4 + }, { "Part": 5 - }, - { - "Part": 7 - }, - { - "Part": 9 - }, - { - "Part": 11 } ] }, diff --git a/tests/thirdparty/005.txt b/tests/thirdparty/005.txt index 8f3dc980371eabce53ea7c70231e0f08d809b2b6..76d5b54ecc2c2ec0ddab29ccd1a9ddbcb6144adc 100644 GIT binary patch delta 336 zcmdmGI8%Sa3Z}_31SKc`U|PzkGkF1%+2of3JeyZC%QDIs>ToFlff0l<26AFSOr?_4 zijv72Sw#8K6ijAgHD)xKY{hCZSwJv#vmM)hCMk$skTFV`#qk*>xj9N!3TcTs#i^Sg z3gj|QuHdqq9KgP8^9F7XMm&lqKNLuxe4qE(WIl1e$q8&+llQO-PQJx;ZF4q1UVT7I yVwmxpJ7uyR+s)0ZM4#Zbzfato(O|M7i}d6;3HHf1#g!S2;JiOTp2_4ii4XuUT3>|l8W^0Z1ln6Hu_*iN|QHmOxb*$bw3l3p-+zP^vMOB&nCwS@lEFC^q%a?%RPC6 z$n4F3xHuTeGI8?;j$+2i7QDuj4Fs2M&f-HD!-MRt$>)V6_|d!q)SAn<`KQ2pkj+yj tUuV6!IbY-nIr-R%DT$Y%9*rXbxvtOm-Cy0RV35fr$VB diff --git a/tests/thirdparty/006.txt b/tests/thirdparty/006.txt index b26c376..7a06fc2 100644 --- a/tests/thirdparty/006.txt +++ b/tests/thirdparty/006.txt @@ -32,9 +32,6 @@ Signed by undersigned { "headers": { "values": { - "subject": { - "Text": "Hide and seek" - }, "mime_version": { "Text": "1.0" }, @@ -46,6 +43,9 @@ Signed by undersigned "boundary": "1" } } + }, + "subject": { + "Text": "Hide and seek" } }, "offsets": [ @@ -92,8 +92,8 @@ Signed by undersigned "c_type": "multipart", "c_subtype": "signed", "attributes": { - "protocol": "signature/plain", "boundary": "2", + "protocol": "signature/plain", "migalc": "pen+paper" } } @@ -170,7 +170,8 @@ Signed by undersigned } ] }, - "contents": "Search me

Don't find me here

\n" + "contents": "Search me

Don't find me here

\n", + "is_html": true } }, { @@ -204,7 +205,8 @@ Signed by undersigned } ] }, - "contents": "Search me, and Find me here" + "contents": "Search me, and Find me here", + "is_html": false } }, { diff --git a/tests/thirdparty/007.txt b/tests/thirdparty/007.txt index 9bad210..1f718c2 100644 --- a/tests/thirdparty/007.txt +++ b/tests/thirdparty/007.txt @@ -97,14 +97,14 @@ Foobar "Message": { "headers": { "values": { - "subject": { - "Text": "my opinion" - }, "from": { "Address": { "name": "someone-else", "address": "someone@else" } + }, + "subject": { + "Text": "my opinion" } }, "offsets": [ @@ -128,22 +128,18 @@ Foobar 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "This is my opinion" - } - }, - { - "Text": { - "contents": "This is my opinion" + "contents": "This is my opinion", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 87, "offset_body": 142, @@ -166,14 +162,14 @@ Foobar "Message": { "headers": { "values": { + "subject": { + "Text": "i disagree" + }, "from": { "Address": { "name": "another one", "address": "another@one" } - }, - "subject": { - "Text": "i disagree" } }, "offsets": [ @@ -197,22 +193,18 @@ Foobar 0 ], "text_body": [ - 1 + 0 ], "parts": [ { "Text": { - "contents": "Not agreeing one bit!" - } - }, - { - "Text": { - "contents": "Not agreeing one bit!" + "contents": "Not agreeing one bit!", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 166, "offset_body": 219, @@ -282,31 +274,26 @@ Foobar 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 } ], "parts": [ - { - "Text": { - "contents": "Lovely attachment for you" - } - }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "binary" - }, "content_type": { "ContentType": { "c_type": "text", "c_subtype": "plain" } + }, + "content_transfer_encoding": { + "Text": "binary" } }, "offsets": [ @@ -326,13 +313,17 @@ Foobar } ] }, - "contents": "Lovely attachment for you" + "contents": "Lovely attachment for you", + "is_html": false } }, { "Binary": { "headers": { "values": { + "content_transfer_encoding": { + "Text": "binary" + }, "content_type": { "ContentType": { "c_type": "application", @@ -342,9 +333,6 @@ Foobar "disposition": "attachment" } } - }, - "content_transfer_encoding": { - "Text": "binary" } }, "offsets": [ @@ -378,10 +366,10 @@ Foobar "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/thirdparty/008.txt b/tests/thirdparty/008.txt index f32118b..2e7bb2b 100644 --- a/tests/thirdparty/008.txt +++ b/tests/thirdparty/008.txt @@ -59,14 +59,8 @@ Root MIME epilogue { "headers": { "values": { - "content_type": { - "ContentType": { - "c_type": "multipart", - "c_subtype": "mixed", - "attributes": { - "boundary": "foo bar" - } - } + "mime_version": { + "Text": "1.0" }, "date": { "DateTime": { @@ -81,8 +75,14 @@ Root MIME epilogue "tz_minute": 0 } }, - "mime_version": { - "Text": "1.0" + "content_type": { + "ContentType": { + "c_type": "multipart", + "c_subtype": "mixed", + "attributes": { + "boundary": "foo bar" + } + } }, "from": { "Address": { @@ -137,7 +137,7 @@ Root MIME epilogue 3 ], "text_body": [ - 4 + 3 ], "attachments": [ { @@ -172,7 +172,8 @@ Root MIME epilogue } ] }, - "contents": "hello\n" + "contents": "hello\n", + "is_html": false } }, { @@ -264,12 +265,12 @@ Root MIME epilogue }, "html_body": [ 0, - 5 + 4 ], "text_body": [ 3, 4, - 6 + 5 ], "parts": [ { @@ -293,7 +294,8 @@ Root MIME epilogue } ] }, - "contents": "

Hello world

\n" + "contents": "

Hello world

\n", + "is_html": true } }, { @@ -346,22 +348,20 @@ Root MIME epilogue }, { "Text": { - "contents": "sub3 text" + "contents": "sub3 text", + "is_html": false } }, { "Text": { - "contents": "sub3 text2" + "contents": "sub3 text2", + "is_html": false } }, { "Text": { - "contents": "sub3 text2" - } - }, - { - "Text": { - "contents": "sub2 text2" + "contents": "sub2 text2", + "is_html": false } } ], @@ -388,7 +388,7 @@ Root MIME epilogue ] }, { - "Part": 6 + "Part": 5 } ] ] @@ -400,11 +400,6 @@ Root MIME epilogue "offset_end": 710 } }, - { - "Text": { - "contents": "Another part" - } - }, { "Text": { "headers": { @@ -426,7 +421,8 @@ Root MIME epilogue } ] }, - "contents": "Another part" + "contents": "Another part", + "is_html": false } } ], @@ -439,7 +435,7 @@ Root MIME epilogue "Part": 1 }, { - "Part": 4 + "Part": 3 } ] }, diff --git a/tests/thirdparty/009.txt b/tests/thirdparty/009.txt index 46b4f9d..d8d0666 100644 --- a/tests/thirdparty/009.txt +++ b/tests/thirdparty/009.txt @@ -23,8 +23,8 @@ dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo= { "headers": { "values": { - "mime_version": { - "Text": "1.0" + "subject": { + "Text": "In parts" }, "content_type": { "ContentType": { @@ -35,8 +35,8 @@ dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo= } } }, - "subject": { - "Text": "In parts" + "mime_version": { + "Text": "1.0" } }, "offsets": [ @@ -67,31 +67,26 @@ dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo= 0 ], "text_body": [ - 1 + 0 ], "attachments": [ { - "Attachment": 2 + "Attachment": 1 } ], "parts": [ - { - "Text": { - "contents": "Hi, this is the fancy thing I was talking about!" - } - }, { "Text": { "headers": { "values": { - "content_transfer_encoding": { - "Text": "binary" - }, "content_type": { "ContentType": { "c_type": "text", "c_subtype": "plain" } + }, + "content_transfer_encoding": { + "Text": "binary" } }, "offsets": [ @@ -111,7 +106,8 @@ dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo= } ] }, - "contents": "Hi, this is the fancy thing I was talking about!" + "contents": "Hi, this is the fancy thing I was talking about!", + "is_html": false } }, { @@ -123,8 +119,8 @@ dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo= "c_type": "message", "c_subtype": "partial", "attributes": { - "total": "5", "number": "1", + "total": "5", "id": "heks68ewe@example.org" } } @@ -389,10 +385,10 @@ dGhpcyBpcyB0aGUgZmlyc3QgcGFydCBvZiB0aGUgbWVzc2FnZQo= "structure": { "List": [ { - "Part": 1 + "Part": 0 }, { - "Part": 2 + "Part": 1 } ] }, diff --git a/tests/thirdparty/010.txt b/tests/thirdparty/010.txt index 98bd6ef..b090517 100644 --- a/tests/thirdparty/010.txt +++ b/tests/thirdparty/010.txt @@ -25,8 +25,8 @@ Content-Language: ja "c_type": "multipart", "c_subtype": "mixed", "attributes": { - "boundary": "1", - "comment": "人権の無視及" + "comment": "人権の無視及", + "boundary": "1" } } } @@ -59,29 +59,24 @@ Content-Language: ja 0 ], "text_body": [ - 1 + 0 ], "parts": [ - { - "Text": { - "contents": "人権の無視及" - } - }, { "Text": { "headers": { "values": { - "content_type": { - "ContentType": { - "c_type": "text", - "c_subtype": "plain" - } - }, "content_transfer_encoding": { "Text": "binary" }, "content_language": { "Text": "ja" + }, + "content_type": { + "ContentType": { + "c_type": "text", + "c_subtype": "plain" + } } }, "offsets": [ @@ -108,12 +103,13 @@ Content-Language: ja } ] }, - "contents": "人権の無視及" + "contents": "人権の無視及", + "is_html": false } } ], "structure": { - "Part": 1 + "Part": 0 }, "offset_header": 0, "offset_body": 146,