Compare commits

...
10 Commits
Author SHA1 Message Date
Mauro D 6749649e8c v0.4.4 2022-01-24 22:18:34 +00:00
Mauro D 63a4620407 Allow multiline headers 2022-01-16 23:09:25 +00:00
Mauro D ccdee2332e RfcHeader to string support. 2022-01-13 16:48:05 +00:00
Mauro D 35754eeaa8 Message preview support. 2022-01-13 13:26:16 +00:00
Mauro D 4a6ec957d2 Added support for subpart raw headers. 2022-01-11 17:00:01 +00:00
Mauro D b48e2d711b Improved raw header parsing. 2022-01-08 15:32:44 +00:00
Mauro D d4c75e74a6 InReplyTo parsed as ID. 2022-01-05 16:37:20 +00:00
Mauro D f7281e09cf v.0.4.3 2021-12-31 08:14:48 +00:00
Mauro D 46a8db9a54 MBox mailbox parsing support. 2021-12-29 18:40:23 +00:00
Mauro D a0448c31e9 Bincode serialization support. 2021-12-28 17:51:41 +00:00
104 changed files with 4191 additions and 8816 deletions
+11
View File
@@ -1,3 +1,14 @@
mail-parser 0.4.4
================================
- Support for multi-line headers.
- Text and HTML message body preview.
- Improved support for raw headers.
mail-parser 0.4.3
================================
- Mbox file parsing support (issue #11) conforming to the [QMail specification](http://qmail.org/qmail-manual-html/man5/mbox.html).
- Support for bincode serialize/deserialize.
mail-parser 0.4.2 mail-parser 0.4.2
================================ ================================
- Added `Message::get_thread_name()` to obtain the base subject of a message as defined in [RFC 5957 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1). - Added `Message::get_thread_name()` to obtain the base subject of a message as defined in [RFC 5957 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1).
Generated
+11 -11
View File
@@ -8,6 +8,15 @@ version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a" checksum = "cdb031dd78e28731d87d56cc8ffef4a8f36ca26c38fe2de700543e627f8a464a"
[[package]]
name = "bincode"
version = "1.3.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "cfg-if" name = "cfg-if"
version = "1.0.0" version = "1.0.0"
@@ -59,11 +68,11 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
[[package]] [[package]]
name = "mail-parser" name = "mail-parser"
version = "0.4.2" version = "0.4.4"
dependencies = [ dependencies = [
"bincode",
"encoding_rs", "encoding_rs",
"serde", "serde",
"serde_bytes",
"serde_json", "serde_json",
"serde_yaml", "serde_yaml",
] ]
@@ -101,15 +110,6 @@ dependencies = [
"serde_derive", "serde_derive",
] ]
[[package]]
name = "serde_bytes"
version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "16ae07dd2f88a366f15bd0632ba725227018c69a1c8550a927324f8eb8368bb9"
dependencies = [
"serde",
]
[[package]] [[package]]
name = "serde_derive" name = "serde_derive"
version = "1.0.130" version = "1.0.130"
+3 -3
View File
@@ -1,7 +1,7 @@
[package] [package]
name = "mail-parser" name = "mail-parser"
description = "Fast and robust e-mail parsing library for Rust" description = "Fast and robust e-mail parsing library for Rust"
version = "0.4.2" version = "0.4.4"
edition = "2018" edition = "2018"
authors = [ "Stalwart Labs <hello@stalw.art>"] authors = [ "Stalwart Labs <hello@stalw.art>"]
license = "Apache-2.0 OR MIT" license = "Apache-2.0 OR MIT"
@@ -14,16 +14,16 @@ readme = "README.md"
[dependencies] [dependencies]
encoding_rs = {version="0.8", optional=true} encoding_rs = {version="0.8", optional=true}
serde = { version = "1.0", features = ["derive"], optional=true} serde = { version = "1.0", features = ["derive"], optional=true}
serde_bytes = { version = "0.11", optional=true}
[dev-dependencies] [dev-dependencies]
serde_yaml = "0.8" serde_yaml = "0.8"
serde_json = "1.0" serde_json = "1.0"
bincode = "1.3.3"
[features] [features]
default = ["serde_support", "full_encoding"] default = ["serde_support", "full_encoding"]
full_encoding = ["encoding_rs"] full_encoding = ["encoding_rs"]
serde_support = ["serde", "serde_bytes"] serde_support = ["serde"]
[profile.bench] [profile.bench]
debug = true debug = true
+17 -24
View File
@@ -4,7 +4,6 @@
[![build](https://github.com/stalwartlabs/mail-parser/actions/workflows/rust.yml/badge.svg)](https://github.com/stalwartlabs/mail-parser/actions/workflows/rust.yml) [![build](https://github.com/stalwartlabs/mail-parser/actions/workflows/rust.yml/badge.svg)](https://github.com/stalwartlabs/mail-parser/actions/workflows/rust.yml)
[![docs.rs](https://img.shields.io/docsrs/mail-parser)](https://docs.rs/mail-parser) [![docs.rs](https://img.shields.io/docsrs/mail-parser)](https://docs.rs/mail-parser)
[![crates.io](https://img.shields.io/crates/l/mail-parser)](http://www.apache.org/licenses/LICENSE-2.0) [![crates.io](https://img.shields.io/crates/l/mail-parser)](http://www.apache.org/licenses/LICENSE-2.0)
[![Twitter Follow](https://img.shields.io/twitter/follow/stalwartlabs?style=social)](https://twitter.com/stalwartlabs)
_mail-parser_ is an **e-mail parsing library** written in Rust that fully conforms to the Internet Message Format standard (_RFC 5322_), the _mail-parser_ is an **e-mail parsing library** written in Rust that fully conforms to the Internet Message Format standard (_RFC 5322_), the
Multipurpose Internet Mail Extensions (MIME; _RFC 2045 - 2049_) as well as many other [internet messaging RFCs](#conformed-rfcs). Multipurpose Internet Mail Extensions (MIME; _RFC 2045 - 2049_) as well as many other [internet messaging RFCs](#conformed-rfcs).
@@ -81,34 +80,26 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
// Parses addresses (including comments), lists and groups // Parses addresses (including comments), lists and groups
assert_eq!( assert_eq!(
message.get_from(), message.get_from(),
&HeaderValue::Address(Addr { &HeaderValue::Address(Addr::new(
name: Some("Art Vandelay (Vandelay Industries)".into()), "Art Vandelay (Vandelay Industries)".into(),
address: Some("art@vandelay.com".into()) "art@vandelay.com"
}) ))
); );
assert_eq!( assert_eq!(
message.get_to(), message.get_to(),
&HeaderValue::GroupList(vec![ &HeaderValue::GroupList(vec![
Group { Group::new(
name: Some("Colleagues".into()), "Colleagues",
addresses: vec![Addr { vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
name: Some("James Smythe".into()), ),
address: Some("james@vandelay.com".into()) Group::new(
}] "Friends",
}, vec![
Group { Addr::new(None, "jane@example.com"),
name: Some("Friends".into()), Addr::new("John Smîth".into(), "john@example.com"),
addresses: vec![
Addr {
name: None,
address: Some("jane@example.com".into())
},
Addr {
name: Some("John Smîth".into()),
address: Some("john@example.com".into())
}
] ]
} )
]) ])
); );
@@ -178,6 +169,8 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
println!("{}", serde_yaml::to_string(&message).unwrap()); println!("{}", serde_yaml::to_string(&message).unwrap());
``` ```
More examples available under the [examples](examples) directory. Please note that this library does not support building e-mail messages as this functionality is provided separately by the [`mail-builder`](https://crates.io/crates/mail-builder) crate.
## Testing, Fuzzing & Benchmarking ## Testing, Fuzzing & Benchmarking
To run the testsuite: To run the testsuite:
+15 -23
View File
@@ -58,34 +58,26 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
// Parses addresses (including comments), lists and groups // Parses addresses (including comments), lists and groups
assert_eq!( assert_eq!(
message.get_from(), message.get_from(),
&HeaderValue::Address(Addr { &HeaderValue::Address(Addr::new(
name: Some("Art Vandelay (Vandelay Industries)".into()), "Art Vandelay (Vandelay Industries)".into(),
address: Some("art@vandelay.com".into()) "art@vandelay.com"
}) ))
); );
assert_eq!( assert_eq!(
message.get_to(), message.get_to(),
&HeaderValue::GroupList(vec![ &HeaderValue::GroupList(vec![
Group { Group::new(
name: Some("Colleagues".into()), "Colleagues",
addresses: vec![Addr { vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
name: Some("James Smythe".into()), ),
address: Some("james@vandelay.com".into()) Group::new(
}] "Friends",
}, vec![
Group { Addr::new(None, "jane@example.com"),
name: Some("Friends".into()), Addr::new("John Smîth".into(), "john@example.com"),
addresses: vec![
Addr {
name: None,
address: Some("jane@example.com".into())
},
Addr {
name: Some("John Smîth".into()),
address: Some("john@example.com".into())
}
] ]
} )
]) ])
); );
+21
View File
@@ -0,0 +1,21 @@
/*
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
* file at the top-level directory of this distribution.
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distributed
* except according to those terms.
*/
use mail_parser::{parsers::mbox::MBoxParser, Message};
fn main() {
// Read an MBox mailbox from stdin and prints each message as YAML.
for raw_message in MBoxParser::new(std::io::stdin()) {
let message = Message::parse(&raw_message).unwrap();
println!("{}", serde_yaml::to_string(&message).unwrap());
}
}
+284 -165
View File
@@ -159,34 +159,26 @@
//! // Parses addresses (including comments), lists and groups //! // Parses addresses (including comments), lists and groups
//! assert_eq!( //! assert_eq!(
//! message.get_from(), //! message.get_from(),
//! &HeaderValue::Address(Addr { //! &HeaderValue::Address(Addr::new(
//! name: Some("Art Vandelay (Vandelay Industries)".into()), //! "Art Vandelay (Vandelay Industries)".into(),
//! address: Some("art@vandelay.com".into()) //! "art@vandelay.com"
//! }) //! ))
//! ); //! );
//!
//! assert_eq!( //! assert_eq!(
//! message.get_to(), //! message.get_to(),
//! &HeaderValue::GroupList(vec![ //! &HeaderValue::GroupList(vec![
//! Group { //! Group::new(
//! name: Some("Colleagues".into()), //! "Colleagues",
//! addresses: vec![Addr { //! vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
//! name: Some("James Smythe".into()), //! ),
//! address: Some("james@vandelay.com".into()) //! Group::new(
//! }] //! "Friends",
//! }, //! vec![
//! Group { //! Addr::new(None, "jane@example.com"),
//! name: Some("Friends".into()), //! Addr::new("John Smîth".into(), "john@example.com"),
//! addresses: vec![
//! Addr {
//! name: None,
//! address: Some("jane@example.com".into())
//! },
//! Addr {
//! name: Some("John Smîth".into()),
//! address: Some("john@example.com".into())
//! }
//! ] //! ]
//! } //! )
//! ]) //! ])
//! ); //! );
//! //!
@@ -259,10 +251,17 @@
pub mod decoders; pub mod decoders;
pub mod parsers; pub mod parsers;
use std::{borrow::Cow, collections::HashMap, fmt}; use std::{
borrow::Cow,
collections::HashMap,
fmt::{self, Display},
};
use decoders::html::{html_to_text, text_to_html}; use decoders::html::{html_to_text, text_to_html};
use parsers::fields::thread::thread_name; use parsers::{
fields::thread::thread_name,
preview::{preview_html, preview_text},
};
#[cfg(feature = "serde_support")] #[cfg(feature = "serde_support")]
use serde::{Deserialize, Serialize}; use serde::{Deserialize, Serialize};
@@ -270,48 +269,19 @@ use serde::{Deserialize, Serialize};
#[derive(Debug, Default, PartialEq)] #[derive(Debug, Default, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct Message<'x> { pub struct Message<'x> {
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "HashMap::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub headers_rfc: RfcHeaders<'x>, pub headers_rfc: RfcHeaders<'x>,
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "HashMap::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub headers_other: OtherHeaders<'x>, #[cfg_attr(feature = "serde_support", serde(skip))]
#[cfg_attr( pub headers_raw: RawHeaders<'x>,
feature = "serde_support",
serde(skip_serializing_if = "Vec::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))]
pub headers_offsets: Vec<HeaderOffset<'x>>,
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Vec::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub html_body: Vec<MessagePartId>, pub html_body: Vec<MessagePartId>,
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Vec::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub text_body: Vec<MessagePartId>, pub text_body: Vec<MessagePartId>,
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Vec::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub attachments: Vec<MessagePartId>, pub attachments: Vec<MessagePartId>,
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Vec::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
#[cfg_attr(feature = "serde_support", serde(borrow))] #[cfg_attr(feature = "serde_support", serde(borrow))]
pub parts: Vec<MessagePart<'x>>, pub parts: Vec<MessagePart<'x>>,
@@ -341,23 +311,32 @@ impl Default for MessageStructure {
} }
} }
// Part of the message. /// Part of the message.
#[derive(Debug, Default, PartialEq)] #[derive(Debug, Default, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct Part<'x, T> { pub struct Part<'x, T> {
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "HashMap::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub headers: RfcHeaders<'x>, pub headers_rfc: RfcHeaders<'x>,
#[cfg_attr(feature = "serde_support", serde(default))]
#[cfg_attr(feature = "serde_support", serde(skip))]
pub headers_raw: RawHeaders<'x>,
pub is_encoding_problem: bool,
pub body: T, pub body: T,
} }
impl<'x, T> Part<'x, T> { impl<'x, T> Part<'x, T> {
pub fn new(headers: RfcHeaders<'x>, body: T) -> Self { pub fn new(
Self { headers, body } headers_rfc: RfcHeaders<'x>,
headers_raw: RawHeaders<'x>,
body: T,
is_encoding_problem: bool,
) -> Self {
Self {
headers_rfc,
headers_raw,
body,
is_encoding_problem,
}
} }
pub fn get_body(&self) -> &T { pub fn get_body(&self) -> &T {
@@ -365,6 +344,26 @@ impl<'x, T> Part<'x, T> {
} }
} }
impl<'x> MultiPart<'x> {
pub fn new(headers_rfc: RfcHeaders<'x>, headers_raw: RawHeaders<'x>) -> Self {
Self {
headers_rfc,
headers_raw,
}
}
}
/// Multipart part
#[derive(Debug, Default, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct MultiPart<'x> {
#[cfg_attr(feature = "serde_support", serde(default))]
pub headers_rfc: RfcHeaders<'x>,
#[cfg_attr(feature = "serde_support", serde(default))]
#[cfg_attr(feature = "serde_support", serde(skip))]
pub headers_raw: RawHeaders<'x>,
}
/// Unique ID representing a MIME part within a message. /// Unique ID representing a MIME part within a message.
pub type MessagePartId = usize; pub type MessagePartId = usize;
@@ -396,7 +395,7 @@ pub enum MessagePart<'x> {
Message(Part<'x, MessageAttachment<'x>>), Message(Part<'x, MessageAttachment<'x>>),
/// Multipart part /// Multipart part
Multipart(RfcHeaders<'x>), Multipart(MultiPart<'x>),
} }
impl<'x> MessagePart<'x> { impl<'x> MessagePart<'x> {
@@ -444,68 +443,92 @@ impl<'x> MessagePart<'x> {
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct Addr<'x> { pub struct Addr<'x> {
/// The address name including comments /// The address name including comments
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Option::is_none")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub name: Option<Cow<'x, str>>, pub name: Option<Cow<'x, str>>,
/// An e-mail address (RFC5322/RFC2369) or URL (RFC2369) /// An e-mail address (RFC5322/RFC2369) or URL (RFC2369)
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Option::is_none")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub address: Option<Cow<'x, str>>, pub address: Option<Cow<'x, str>>,
} }
impl<'x> Addr<'x> {
pub fn new(name: Option<&'x str>, address: &'x str) -> Self {
Self {
name: name.map(|name| name.into()),
address: Some(address.into()),
}
}
pub fn into_owned<'y>(self) -> Addr<'y> {
Addr {
name: self.name.map(|s| s.into_owned().into()),
address: self.address.map(|s| s.into_owned().into()),
}
}
}
/// An RFC5322 address group. /// An RFC5322 address group.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct Group<'x> { pub struct Group<'x> {
/// Group name /// Group name
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Option::is_none")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub name: Option<Cow<'x, str>>, pub name: Option<Cow<'x, str>>,
/// Addressess member of the group /// Addressess member of the group
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Vec::is_empty")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub addresses: Vec<Addr<'x>>, pub addresses: Vec<Addr<'x>>,
} }
pub type RfcHeaders<'x> = HashMap<HeaderName, HeaderValue<'x>>; impl<'x> Group<'x> {
pub type OtherHeaders<'x> = HashMap<Cow<'x, str>, HeaderValue<'x>>; pub fn new(name: &'x str, addresses: Vec<Addr<'x>>) -> Self {
Self {
name: Some(name.into()),
addresses,
}
}
pub fn into_owned<'y>(self) -> Group<'y> {
Group {
name: self.name.map(|s| s.into_owned().into()),
addresses: self.addresses.into_iter().map(|a| a.into_owned()).collect(),
}
}
}
pub type RfcHeaders<'x> = HashMap<RfcHeader, HeaderValue<'x>>;
pub type RawHeaders<'x> = HashMap<HeaderName<'x>, Vec<HeaderOffset>>;
/// Offset of a message element in the raw message. /// Offset of a message element in the raw message.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq, Eq, Clone)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct HeaderOffset<'x> { pub struct HeaderOffset {
pub name: HeaderOffsetName<'x>,
pub start: usize, pub start: usize,
pub end: usize, pub end: usize,
} }
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq, Eq, Hash, Clone)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub enum HeaderOffsetName<'x> { pub enum HeaderName<'x> {
Rfc(HeaderName), Rfc(RfcHeader),
Other(Cow<'x, str>), Other(Cow<'x, str>),
} }
impl<'x> HeaderName<'x> {
pub fn into_owned<'y>(&self) -> HeaderName<'y> {
match self {
HeaderName::Rfc(header) => HeaderName::Rfc(*header),
HeaderName::Other(name) => HeaderName::Other(name.clone().into_owned().into()),
}
}
}
/// A header field /// A header field
#[repr(u8)] #[repr(u8)]
#[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)] #[derive(Debug, PartialEq, Eq, Hash, Clone, Copy)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
#[cfg_attr(feature = "serde_support", serde(rename_all = "snake_case"))] #[cfg_attr(feature = "serde_support", serde(rename_all = "snake_case"))]
pub enum HeaderName { pub enum RfcHeader {
Subject = 0, Subject = 0,
From = 1, From = 1,
To = 2, To = 2,
@@ -543,12 +566,56 @@ pub enum HeaderName {
ListPost = 34, ListPost = 34,
ListSubscribe = 35, ListSubscribe = 35,
ListUnsubscribe = 36, ListUnsubscribe = 36,
Other = 37, }
impl Display for RfcHeader {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
RfcHeader::Subject => write!(f, "Subject"),
RfcHeader::From => write!(f, "From"),
RfcHeader::To => write!(f, "To"),
RfcHeader::Cc => write!(f, "Cc"),
RfcHeader::Date => write!(f, "Date"),
RfcHeader::Bcc => write!(f, "Bcc"),
RfcHeader::ReplyTo => write!(f, "Reply-To"),
RfcHeader::Sender => write!(f, "Sender"),
RfcHeader::Comments => write!(f, "Comments"),
RfcHeader::InReplyTo => write!(f, "In-Reply-To"),
RfcHeader::Keywords => write!(f, "Keywords"),
RfcHeader::Received => write!(f, "Received"),
RfcHeader::MessageId => write!(f, "Message-ID"),
RfcHeader::References => write!(f, "References"),
RfcHeader::ReturnPath => write!(f, "Return-Path"),
RfcHeader::MimeVersion => write!(f, "MIME-Version"),
RfcHeader::ContentDescription => write!(f, "Content-Description"),
RfcHeader::ContentId => write!(f, "Content-ID"),
RfcHeader::ContentLanguage => write!(f, "Content-Language"),
RfcHeader::ContentLocation => write!(f, "Content-Location"),
RfcHeader::ContentTransferEncoding => write!(f, "Content-Transfer-Encoding"),
RfcHeader::ContentType => write!(f, "Content-Type"),
RfcHeader::ContentDisposition => write!(f, "Content-Disposition"),
RfcHeader::ResentTo => write!(f, "Resent-To"),
RfcHeader::ResentFrom => write!(f, "Resent-From"),
RfcHeader::ResentBcc => write!(f, "Resent-Bcc"),
RfcHeader::ResentCc => write!(f, "Resent-Cc"),
RfcHeader::ResentSender => write!(f, "Resent-Sender"),
RfcHeader::ResentDate => write!(f, "Resent-Date"),
RfcHeader::ResentMessageId => write!(f, "Resent-Message-ID"),
RfcHeader::ListArchive => write!(f, "List-Archive"),
RfcHeader::ListHelp => write!(f, "List-Help"),
RfcHeader::ListId => write!(f, "List-ID"),
RfcHeader::ListOwner => write!(f, "List-Owner"),
RfcHeader::ListPost => write!(f, "List-Post"),
RfcHeader::ListSubscribe => write!(f, "List-Subscribe"),
RfcHeader::ListUnsubscribe => write!(f, "List-Unsubscribe"),
}
}
} }
/// A parsed header value. /// A parsed header value.
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
//#[cfg_attr(feature = "serde_support", serde(tag = "type"))]
pub enum HeaderValue<'x> { pub enum HeaderValue<'x> {
/// A single address /// A single address
Address(Addr<'x>), Address(Addr<'x>),
@@ -591,22 +658,22 @@ impl<'x> HeaderValue<'x> {
*self == HeaderValue::Empty *self == HeaderValue::Empty
} }
pub fn unwrap_text(&mut self) -> Cow<'x, str> { pub fn unwrap_text(self) -> Cow<'x, str> {
match std::mem::take(self) { match self {
HeaderValue::Text(s) => s, HeaderValue::Text(s) => s,
_ => panic!("HeaderValue::unwrap_text called on non-Text value"), _ => panic!("HeaderValue::unwrap_text called on non-Text value"),
} }
} }
pub fn unwrap_datetime(&mut self) -> DateTime { pub fn unwrap_datetime(self) -> DateTime {
match std::mem::take(self) { match self {
HeaderValue::DateTime(d) => d, HeaderValue::DateTime(d) => d,
_ => panic!("HeaderValue::unwrap_datetime called on non-DateTime value"), _ => panic!("HeaderValue::unwrap_datetime called on non-DateTime value"),
} }
} }
pub fn unwrap_content_type(&mut self) -> ContentType<'x> { pub fn unwrap_content_type(self) -> ContentType<'x> {
match std::mem::take(self) { match self {
HeaderValue::ContentType(c) => c, HeaderValue::ContentType(c) => c,
_ => panic!("HeaderValue::unwrap_content_type called on non-ContentType value"), _ => panic!("HeaderValue::unwrap_content_type called on non-ContentType value"),
} }
@@ -615,7 +682,7 @@ impl<'x> HeaderValue<'x> {
pub fn as_text_ref(&self) -> Option<&str> { pub fn as_text_ref(&self) -> Option<&str> {
match *self { match *self {
HeaderValue::Text(ref s) => Some(s), HeaderValue::Text(ref s) => Some(s),
HeaderValue::TextList(ref l) => l.get(0)?.as_ref().into(), HeaderValue::TextList(ref l) => l.last()?.as_ref().into(),
_ => None, _ => None,
} }
} }
@@ -640,6 +707,40 @@ impl<'x> HeaderValue<'x> {
_ => None, _ => None,
} }
} }
pub fn into_owned<'y>(self) -> HeaderValue<'y> {
match self {
HeaderValue::Address(addr) => HeaderValue::Address(addr.into_owned()),
HeaderValue::AddressList(list) => {
HeaderValue::AddressList(list.into_iter().map(|addr| addr.into_owned()).collect())
}
HeaderValue::Group(group) => HeaderValue::Group(group.into_owned()),
HeaderValue::GroupList(list) => {
HeaderValue::GroupList(list.into_iter().map(|group| group.into_owned()).collect())
}
HeaderValue::Text(text) => HeaderValue::Text(text.into_owned().into()),
HeaderValue::TextList(list) => HeaderValue::TextList(
list.into_iter()
.map(|text| text.into_owned().into())
.collect(),
),
HeaderValue::DateTime(datetime) => HeaderValue::DateTime(datetime),
HeaderValue::ContentType(ct) => HeaderValue::ContentType(ContentType {
c_type: ct.c_type.into_owned().into(),
c_subtype: ct.c_subtype.map(|s| s.into_owned().into()),
attributes: ct.attributes.map(|attributes| {
attributes
.into_iter()
.map(|(k, v)| (k.into_owned().into(), v.into_owned().into()))
.collect()
}),
}),
HeaderValue::Collection(list) => {
HeaderValue::Collection(list.into_iter().map(|v| v.into_owned()).collect())
}
HeaderValue::Empty => HeaderValue::Empty,
}
}
} }
/// An RFC2047 Content-Type or RFC2183 Content-Disposition MIME header field. /// An RFC2047 Content-Type or RFC2183 Content-Disposition MIME header field.
@@ -647,16 +748,8 @@ impl<'x> HeaderValue<'x> {
#[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))] #[cfg_attr(feature = "serde_support", derive(Serialize, Deserialize))]
pub struct ContentType<'x> { pub struct ContentType<'x> {
pub c_type: Cow<'x, str>, pub c_type: Cow<'x, str>,
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Option::is_none")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub c_subtype: Option<Cow<'x, str>>, pub c_subtype: Option<Cow<'x, str>>,
#[cfg_attr(
feature = "serde_support",
serde(skip_serializing_if = "Option::is_none")
)]
#[cfg_attr(feature = "serde_support", serde(default))] #[cfg_attr(feature = "serde_support", serde(default))]
pub attributes: Option<HashMap<Cow<'x, str>, Cow<'x, str>>>, pub attributes: Option<HashMap<Cow<'x, str>, Cow<'x, str>>>,
} }
@@ -678,214 +771,215 @@ pub struct DateTime {
impl<'x> Message<'x> { impl<'x> Message<'x> {
/// Returns an iterator over the RFC headers of this message. /// Returns an iterator over the RFC headers of this message.
pub fn get_headers_rfc(&self) -> impl Iterator<Item = (&HeaderName, &HeaderValue<'x>)> { pub fn get_headers_rfc(&self) -> impl Iterator<Item = (&RfcHeader, &HeaderValue<'x>)> {
self.headers_rfc.iter() self.headers_rfc.iter()
} }
/// Returns the BCC header field /// Returns the BCC header field
pub fn get_bcc(&self) -> &HeaderValue<'x> { pub fn get_bcc(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Bcc) .get(&RfcHeader::Bcc)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the CC header field /// Returns the CC header field
pub fn get_cc(&self) -> &HeaderValue<'x> { pub fn get_cc(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Cc) .get(&RfcHeader::Cc)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all Comments header fields /// Returns all Comments header fields
pub fn get_comments(&self) -> &HeaderValue<'x> { pub fn get_comments(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Comments) .get(&RfcHeader::Comments)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Date header field /// Returns the Date header field
pub fn get_date(&self) -> Option<&DateTime> { pub fn get_date(&self) -> Option<&DateTime> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Date) .get(&RfcHeader::Date)
.and_then(|header| header.as_datetime_ref()) .and_then(|header| header.as_datetime_ref())
} }
/// Returns the From header field /// Returns the From header field
pub fn get_from(&self) -> &HeaderValue<'x> { pub fn get_from(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::From) .get(&RfcHeader::From)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all In-Reply-To header fields /// Returns all In-Reply-To header fields
pub fn get_in_reply_to(&self) -> &HeaderValue<'x> { pub fn get_in_reply_to(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::InReplyTo) .get(&RfcHeader::InReplyTo)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all Keywords header fields /// Returns all Keywords header fields
pub fn get_keywords(&self) -> &HeaderValue<'x> { pub fn get_keywords(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Keywords) .get(&RfcHeader::Keywords)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the List-Archive header field /// Returns the List-Archive header field
pub fn get_list_archive(&self) -> &HeaderValue<'x> { pub fn get_list_archive(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ListArchive) .get(&RfcHeader::ListArchive)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the List-Help header field /// Returns the List-Help header field
pub fn get_list_help(&self) -> &HeaderValue<'x> { pub fn get_list_help(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ListHelp) .get(&RfcHeader::ListHelp)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the List-ID header field /// Returns the List-ID header field
pub fn get_list_id(&self) -> &HeaderValue<'x> { pub fn get_list_id(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ListId) .get(&RfcHeader::ListId)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the List-Owner header field /// Returns the List-Owner header field
pub fn get_list_owner(&self) -> &HeaderValue<'x> { pub fn get_list_owner(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ListOwner) .get(&RfcHeader::ListOwner)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the List-Post header field /// Returns the List-Post header field
pub fn get_list_post(&self) -> &HeaderValue<'x> { pub fn get_list_post(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ListPost) .get(&RfcHeader::ListPost)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the List-Subscribe header field /// Returns the List-Subscribe header field
pub fn get_list_subscribe(&self) -> &HeaderValue<'x> { pub fn get_list_subscribe(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ListSubscribe) .get(&RfcHeader::ListSubscribe)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the List-Unsubscribe header field /// Returns the List-Unsubscribe header field
pub fn get_list_unsubscribe(&self) -> &HeaderValue<'x> { pub fn get_list_unsubscribe(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ListUnsubscribe) .get(&RfcHeader::ListUnsubscribe)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Message-ID header field /// Returns the Message-ID header field
pub fn get_message_id(&self) -> Option<&str> { pub fn get_message_id(&self) -> Option<&str> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::MessageId) .get(&RfcHeader::MessageId)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
/// Returns the MIME-Version header field /// Returns the MIME-Version header field
pub fn get_mime_version(&self) -> &HeaderValue<'x> { pub fn get_mime_version(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::MimeVersion) .get(&RfcHeader::MimeVersion)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all Received header fields /// Returns all Received header fields
pub fn get_received(&self) -> &HeaderValue<'x> { pub fn get_received(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Received) .get(&RfcHeader::Received)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all References header fields /// Returns all References header fields
pub fn get_references(&self) -> &HeaderValue<'x> { pub fn get_references(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::References) .get(&RfcHeader::References)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Reply-To header field /// Returns the Reply-To header field
pub fn get_reply_to(&self) -> &HeaderValue<'x> { pub fn get_reply_to(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ReplyTo) .get(&RfcHeader::ReplyTo)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Resent-BCC header field /// Returns the Resent-BCC header field
pub fn get_resent_bcc(&self) -> &HeaderValue<'x> { pub fn get_resent_bcc(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ResentBcc) .get(&RfcHeader::ResentBcc)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Resent-CC header field /// Returns the Resent-CC header field
pub fn get_resent_cc(&self) -> &HeaderValue<'x> { pub fn get_resent_cc(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ResentTo) .get(&RfcHeader::ResentTo)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all Resent-Date header fields /// Returns all Resent-Date header fields
pub fn get_resent_date(&self) -> &HeaderValue<'x> { pub fn get_resent_date(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ResentDate) .get(&RfcHeader::ResentDate)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Resent-From header field /// Returns the Resent-From header field
pub fn get_resent_from(&self) -> &HeaderValue<'x> { pub fn get_resent_from(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ResentFrom) .get(&RfcHeader::ResentFrom)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all Resent-Message-ID header fields /// Returns all Resent-Message-ID header fields
pub fn get_resent_message_id(&self) -> &HeaderValue<'x> { pub fn get_resent_message_id(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ResentMessageId) .get(&RfcHeader::ResentMessageId)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Sender header field /// Returns the Sender header field
pub fn get_resent_sender(&self) -> &HeaderValue<'x> { pub fn get_resent_sender(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ResentSender) .get(&RfcHeader::ResentSender)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Resent-To header field /// Returns the Resent-To header field
pub fn get_resent_to(&self) -> &HeaderValue<'x> { pub fn get_resent_to(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ResentTo) .get(&RfcHeader::ResentTo)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns all Return-Path header fields /// Returns all Return-Path header fields
pub fn get_return_path(&self) -> &HeaderValue<'x> { pub fn get_return_path(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ReturnPath) .get(&RfcHeader::ReturnPath)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Sender header field /// Returns the Sender header field
pub fn get_sender(&self) -> &HeaderValue<'x> { pub fn get_sender(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Sender) .get(&RfcHeader::Sender)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns the Subject header field /// Returns the Subject header field
pub fn get_subject(&self) -> Option<&str> { pub fn get_subject(&self) -> Option<&str> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::Subject) .get(&RfcHeader::Subject)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
/// Returns the message thread name /// Returns the message thread name or 'base subject' as defined in
/// [RFC 5957 - Internet Message Access Protocol - SORT and THREAD Extensions (Section 2.1)](https://datatracker.ietf.org/doc/html/rfc5256#section-2.1)
pub fn get_thread_name(&self) -> Option<&str> { pub fn get_thread_name(&self) -> Option<&str> {
thread_name(self.get_subject()?).into() thread_name(self.get_subject()?).into()
} }
@@ -893,15 +987,40 @@ impl<'x> Message<'x> {
/// Returns the To header field /// Returns the To header field
pub fn get_to(&self) -> &HeaderValue<'x> { pub fn get_to(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::To) .get(&RfcHeader::To)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
/// Returns a non-standard header field /// Returns a preview of the message body
pub fn get_other(&self, name: &'x str) -> &HeaderValue<'x> { pub fn get_body_preview(&self, preview_len: usize) -> Option<Cow<'x, str>> {
self.headers_other if !self.text_body.is_empty() {
.get(&Cow::from(name)) preview_text(self.get_text_body(0)?, preview_len).into()
.unwrap_or(&HeaderValue::Empty) } else if !self.html_body.is_empty() {
preview_html(self.get_html_body(0)?, preview_len).into()
} else {
None
}
}
pub fn _get_raw(&'x self, name: HeaderName) -> Option<Vec<Cow<'x, str>>> {
self.headers_raw
.get(&name)?
.iter()
.map(|offset| {
String::from_utf8_lossy(self.raw_message.get(offset.start..offset.end).unwrap())
})
.collect::<Vec<Cow<str>>>()
.into()
}
/// Returns in raw format a header field not defined in the conformed RFCs
pub fn get_other_header(&'x self, name: &str) -> Option<Vec<Cow<'x, str>>> {
self._get_raw(HeaderName::Other(name.into()))
}
/// Returns in raw format a header field defined in the conformed RFCs
pub fn get_rfc_header(&'x self, name: RfcHeader) -> Option<Vec<Cow<'x, str>>> {
self._get_raw(HeaderName::Rfc(name))
} }
fn get_part(&self, list: &'x [MessagePartId], pos: usize) -> Option<&'x dyn BodyPart> { fn get_part(&self, list: &'x [MessagePartId], pos: usize) -> Option<&'x dyn BodyPart> {
@@ -1017,43 +1136,43 @@ pub trait MimeHeaders<'x> {
impl<'x> MimeHeaders<'x> for Message<'x> { impl<'x> MimeHeaders<'x> for Message<'x> {
fn get_content_description(&self) -> Option<&str> { fn get_content_description(&self) -> Option<&str> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ContentDescription) .get(&RfcHeader::ContentDescription)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
fn get_content_disposition(&self) -> Option<&ContentType> { fn get_content_disposition(&self) -> Option<&ContentType> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ContentDisposition) .get(&RfcHeader::ContentDisposition)
.and_then(|header| header.as_content_type_ref()) .and_then(|header| header.as_content_type_ref())
} }
fn get_content_id(&self) -> Option<&str> { fn get_content_id(&self) -> Option<&str> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ContentId) .get(&RfcHeader::ContentId)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
fn get_content_transfer_encoding(&self) -> Option<&str> { fn get_content_transfer_encoding(&self) -> Option<&str> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ContentTransferEncoding) .get(&RfcHeader::ContentTransferEncoding)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
fn get_content_type(&self) -> Option<&ContentType> { fn get_content_type(&self) -> Option<&ContentType> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ContentType) .get(&RfcHeader::ContentType)
.and_then(|header| header.as_content_type_ref()) .and_then(|header| header.as_content_type_ref())
} }
fn get_content_language(&self) -> &HeaderValue<'x> { fn get_content_language(&self) -> &HeaderValue<'x> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ContentLanguage) .get(&RfcHeader::ContentLanguage)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
fn get_content_location(&self) -> Option<&str> { fn get_content_location(&self) -> Option<&str> {
self.headers_rfc self.headers_rfc
.get(&HeaderName::ContentLocation) .get(&RfcHeader::ContentLocation)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
} }
@@ -1173,44 +1292,44 @@ impl<'x> fmt::Display for Part<'x, MessageAttachment<'x>> {
impl<'x, T> MimeHeaders<'x> for Part<'x, T> { impl<'x, T> MimeHeaders<'x> for Part<'x, T> {
fn get_content_description(&self) -> Option<&str> { fn get_content_description(&self) -> Option<&str> {
self.headers self.headers_rfc
.get(&HeaderName::ContentDescription) .get(&RfcHeader::ContentDescription)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
fn get_content_disposition(&self) -> Option<&ContentType> { fn get_content_disposition(&self) -> Option<&ContentType> {
self.headers self.headers_rfc
.get(&HeaderName::ContentDisposition) .get(&RfcHeader::ContentDisposition)
.and_then(|header| header.as_content_type_ref()) .and_then(|header| header.as_content_type_ref())
} }
fn get_content_id(&self) -> Option<&str> { fn get_content_id(&self) -> Option<&str> {
self.headers self.headers_rfc
.get(&HeaderName::ContentId) .get(&RfcHeader::ContentId)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
fn get_content_transfer_encoding(&self) -> Option<&str> { fn get_content_transfer_encoding(&self) -> Option<&str> {
self.headers self.headers_rfc
.get(&HeaderName::ContentTransferEncoding) .get(&RfcHeader::ContentTransferEncoding)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
fn get_content_type(&self) -> Option<&ContentType> { fn get_content_type(&self) -> Option<&ContentType> {
self.headers self.headers_rfc
.get(&HeaderName::ContentType) .get(&RfcHeader::ContentType)
.and_then(|header| header.as_content_type_ref()) .and_then(|header| header.as_content_type_ref())
} }
fn get_content_language(&self) -> &HeaderValue<'x> { fn get_content_language(&self) -> &HeaderValue<'x> {
self.headers self.headers_rfc
.get(&HeaderName::ContentLanguage) .get(&RfcHeader::ContentLanguage)
.unwrap_or(&HeaderValue::Empty) .unwrap_or(&HeaderValue::Empty)
} }
fn get_content_location(&self) -> Option<&str> { fn get_content_location(&self) -> Option<&str> {
self.headers self.headers_rfc
.get(&HeaderName::ContentLocation) .get(&RfcHeader::ContentLocation)
.and_then(|header| header.as_text_ref()) .and_then(|header| header.as_text_ref())
} }
} }
+113 -139
View File
@@ -11,19 +11,24 @@
use std::{borrow::Cow, collections::hash_map::Entry}; use std::{borrow::Cow, collections::hash_map::Entry};
use crate::{HeaderName, HeaderOffset, HeaderOffsetName, HeaderValue, OtherHeaders, RfcHeaders}; use crate::{HeaderName, HeaderOffset, HeaderValue, RawHeaders, RfcHeader, RfcHeaders};
use super::{ use super::{
fields::{ fields::{
address::parse_address, content_type::parse_content_type, date::parse_date, id::parse_id, address::parse_address,
list::parse_comma_separared, raw::parse_raw, unstructured::parse_unstructured, content_type::parse_content_type,
date::parse_date,
id::parse_id,
list::parse_comma_separared,
raw::{parse_and_ignore, parse_raw},
unstructured::parse_unstructured,
}, },
message::MessageStream, message::MessageStream,
}; };
#[derive(Debug, PartialEq)] #[derive(Debug, PartialEq)]
pub enum HeaderParserResult<'x> { pub enum HeaderParserResult<'x> {
Rfc(HeaderName), Rfc(RfcHeader),
Other(Cow<'x, str>), Other(Cow<'x, str>),
Lf, Lf,
Eof, Eof,
@@ -31,8 +36,7 @@ pub enum HeaderParserResult<'x> {
pub fn parse_headers<'x>( pub fn parse_headers<'x>(
headers_rfc: &mut RfcHeaders<'x>, headers_rfc: &mut RfcHeaders<'x>,
mut headers_other: Option<&mut OtherHeaders<'x>>, headers_raw: &mut RawHeaders<'x>,
mut headers_offsets: Option<&mut Vec<HeaderOffset<'x>>>,
stream: &mut MessageStream<'x>, stream: &mut MessageStream<'x>,
) -> bool { ) -> bool {
loop { loop {
@@ -41,72 +45,45 @@ pub fn parse_headers<'x>(
match result { match result {
HeaderParserResult::Rfc(name) => { HeaderParserResult::Rfc(name) => {
let (is_many, parser) = HDR_PARSER[name as usize]; let (_, parser) = HDR_PARSER[name as usize];
let from_offset = stream.pos; let from_offset = stream.pos;
let value = parser(stream); let value = parser(stream);
if let Some(headers_offsets) = headers_offsets.as_mut() { headers_raw
headers_offsets.push(HeaderOffset { .entry(HeaderName::Rfc(name))
name: HeaderOffsetName::Rfc(name), .or_insert_with(Vec::new)
.push(HeaderOffset {
start: from_offset, start: from_offset,
end: stream.pos, end: stream.pos,
}); });
}
if !value.is_empty() { if !value.is_empty() {
if is_many { match headers_rfc.entry(name) {
match headers_rfc.entry(name) { Entry::Occupied(mut e) => {
Entry::Occupied(mut e) => { if let HeaderValue::Collection(col) = e.get_mut() {
if let HeaderValue::Collection(col) = e.get_mut() { col.push(value);
col.push(value); } else {
} else { let old_value = e.remove();
let old_value = e.remove(); headers_rfc
headers_rfc.insert( .insert(name, HeaderValue::Collection(vec![old_value, value]));
name,
HeaderValue::Collection(vec![old_value, value]),
);
}
}
Entry::Vacant(e) => {
e.insert(value);
} }
} }
} else { Entry::Vacant(e) => {
headers_rfc.insert(name, value); e.insert(value);
}
} }
} }
} }
HeaderParserResult::Other(name) => { HeaderParserResult::Other(name) => {
if let Some(headers_other) = headers_other.as_mut() { let from_offset = stream.pos;
let from_offset = stream.pos; parse_and_ignore(stream);
let value = parse_raw(stream); headers_raw
if let Some(headers_offsets) = headers_offsets.as_mut() { .entry(HeaderName::Other(name))
headers_offsets.push(HeaderOffset { .or_insert_with(Vec::new)
name: HeaderOffsetName::Other(name.clone()), .push(HeaderOffset {
start: from_offset, start: from_offset,
end: stream.pos, end: stream.pos,
}); });
}
if !value.is_empty() {
match headers_other.entry(name.clone()) {
Entry::Occupied(mut e) => {
if let HeaderValue::Collection(col) = e.get_mut() {
col.push(value);
} else {
let old_value = e.remove();
headers_other.insert(
name,
HeaderValue::Collection(vec![old_value, value]),
);
}
}
Entry::Vacant(e) => {
e.insert(value);
}
}
}
}
} }
HeaderParserResult::Lf => return true, HeaderParserResult::Lf => return true,
HeaderParserResult::Eof => return false, HeaderParserResult::Eof => return false,
@@ -173,27 +150,24 @@ pub fn parse_header_name(data: &[u8]) -> (usize, HeaderParserResult) {
(bytes_read, HeaderParserResult::Eof) (bytes_read, HeaderParserResult::Eof)
} }
impl From<HeaderName> for u8 { impl From<RfcHeader> for u8 {
fn from(name: HeaderName) -> Self { fn from(name: RfcHeader) -> Self {
name as u8 name as u8
} }
} }
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use crate::{parsers::header::parse_header_name, HeaderName}; use crate::{parsers::header::parse_header_name, RfcHeader};
use super::HeaderParserResult; use super::HeaderParserResult;
#[test] #[test]
fn header_name_parse() { fn header_name_parse() {
let inputs = [ let inputs = [
("From: ", HeaderParserResult::Rfc(HeaderName::From)), ("From: ", HeaderParserResult::Rfc(RfcHeader::From)),
("receiVED: ", HeaderParserResult::Rfc(HeaderName::Received)), ("receiVED: ", HeaderParserResult::Rfc(RfcHeader::Received)),
( (" subject : ", HeaderParserResult::Rfc(RfcHeader::Subject)),
" subject : ",
HeaderParserResult::Rfc(HeaderName::Subject),
),
( (
"X-Custom-Field : ", "X-Custom-Field : ",
HeaderParserResult::Other("X-Custom-Field".into()), HeaderParserResult::Other("X-Custom-Field".into()),
@@ -205,7 +179,7 @@ mod tests {
), ),
( (
"MIME-version : ", "MIME-version : ",
HeaderParserResult::Rfc(HeaderName::MimeVersion), HeaderParserResult::Rfc(RfcHeader::MimeVersion),
), ),
]; ];
@@ -231,7 +205,7 @@ static HDR_PARSER: &[(
(false, parse_address), // ReplyTo = 6, (false, parse_address), // ReplyTo = 6,
(false, parse_address), // Sender = 7, (false, parse_address), // Sender = 7,
(true, parse_unstructured), // Comments = 8, (true, parse_unstructured), // Comments = 8,
(false, parse_address), // InReplyTo = 9, (false, parse_id), // InReplyTo = 9,
(true, parse_comma_separared), // Keywords = 10, (true, parse_comma_separared), // Keywords = 10,
(true, parse_raw), // Received = 11, (true, parse_raw), // Received = 11,
(false, parse_id), // MessageId = 12, (false, parse_id), // MessageId = 12,
@@ -276,76 +250,76 @@ static HDR_HASH: &[u8] = &[
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
]; ];
static HDR_MAP: &[HeaderName] = &[ static HDR_MAP: &[RfcHeader] = &[
HeaderName::Date, RfcHeader::Date,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Sender, RfcHeader::Sender,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Received, RfcHeader::Received,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::References, RfcHeader::References,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Cc, RfcHeader::Cc,
HeaderName::Comments, RfcHeader::Comments,
HeaderName::ResentCc, RfcHeader::ResentCc,
HeaderName::ContentId, RfcHeader::ContentId,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ResentMessageId, RfcHeader::ResentMessageId,
HeaderName::ReplyTo, RfcHeader::ReplyTo,
HeaderName::ResentTo, RfcHeader::ResentTo,
HeaderName::ResentBcc, RfcHeader::ResentBcc,
HeaderName::ContentLanguage, RfcHeader::ContentLanguage,
HeaderName::Subject, RfcHeader::Subject,
HeaderName::ResentSender, RfcHeader::ResentSender,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ResentDate, RfcHeader::ResentDate,
HeaderName::To, RfcHeader::To,
HeaderName::Bcc, RfcHeader::Bcc,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ContentTransferEncoding, RfcHeader::ContentTransferEncoding,
HeaderName::ReturnPath, RfcHeader::ReturnPath,
HeaderName::ListId, RfcHeader::ListId,
HeaderName::Keywords, RfcHeader::Keywords,
HeaderName::ContentDescription, RfcHeader::ContentDescription,
HeaderName::ListOwner, RfcHeader::ListOwner,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ContentType, RfcHeader::ContentType,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ListHelp, RfcHeader::ListHelp,
HeaderName::MessageId, RfcHeader::MessageId,
HeaderName::ContentLocation, RfcHeader::ContentLocation,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ListSubscribe, RfcHeader::ListSubscribe,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ListPost, RfcHeader::ListPost,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ResentFrom, RfcHeader::ResentFrom,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ContentDisposition, RfcHeader::ContentDisposition,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::InReplyTo, RfcHeader::InReplyTo,
HeaderName::ListArchive, RfcHeader::ListArchive,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::From, RfcHeader::From,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::ListUnsubscribe, RfcHeader::ListUnsubscribe,
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::Other, RfcHeader::MimeVersion, // Invalid
HeaderName::MimeVersion, RfcHeader::MimeVersion,
]; ];
static HDR_NAMES: &[&[u8]] = &[ static HDR_NAMES: &[&[u8]] = &[
+126
View File
@@ -0,0 +1,126 @@
/*
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
* file at the top-level directory of this distribution.
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distributed
* except according to those terms.
*/
use std::io::{BufRead, BufReader, Read};
/// Parses an MBox mailbox from a `Read` stream, returning each message as a
/// `Vec<u8>`.
/// supports >From quoting as defined in the [QMail mbox specification](http://qmail.org/qmail-manual-html/man5/mbox.html).
pub struct MBoxParser<T: Read> {
reader: BufReader<T>,
found_from: bool,
}
impl<T> MBoxParser<T>
where
T: Read,
{
pub fn new(reader: T) -> MBoxParser<T> {
MBoxParser {
reader: BufReader::new(reader),
found_from: false,
}
}
}
impl<T> Iterator for MBoxParser<T>
where
T: Read,
{
type Item = Vec<u8>;
fn next(&mut self) -> Option<Vec<u8>> {
let mut message = Vec::with_capacity(1024);
let mut message_line = Vec::with_capacity(80);
while self
.reader
.read_until(b'\n', &mut message_line)
.expect("Error while reading Mbox")
> 0
{
let is_from = message_line
.get(..5)
.map(|line| line == b"From ")
.unwrap_or(false);
if self.found_from {
if !is_from {
if message_line[0] != b'>' {
message.append(&mut message_line);
} else if message_line
.iter()
.skip_while(|&&ch| ch == b'>')
.take(5)
.copied()
.collect::<Vec<u8>>()
== b"From "
{
message.extend_from_slice(&message_line[1..]);
message_line.clear();
} else {
message.append(&mut message_line);
}
} else {
break;
}
} else {
if is_from {
self.found_from = true;
}
message_line.clear();
}
}
if !message.is_empty() {
Some(message)
} else {
None
}
}
}
#[cfg(test)]
mod tests {
use super::MBoxParser;
#[test]
fn parse_mbox() {
let message = br#"From Mon, 15 Jan 2018 15:30:00 +0100
Message 1
From Mon, 15 Jan 2018 15:30:00 +0100
Message 2
From Mon, 15 Jan 2018 15:30:00 +0100
Message 3
>From hello
>>From world
>>>From test
From Mon, 15 Jan 2018 15:30:00 +0100
Message 4
> From
>F
"#;
let mut parser = MBoxParser::new(&message[..]);
assert_eq!(parser.next().unwrap(), b"Message 1\n\n");
assert_eq!(parser.next().unwrap(), b"Message 2\n\n");
assert_eq!(
parser.next().unwrap(),
b"Message 3\nFrom hello\n>From world\n>>From test\n\n"
);
assert_eq!(parser.next().unwrap(), b"Message 4\n> From\n>F\n");
assert!(parser.next().is_none());
}
}
+93 -20
View File
@@ -17,7 +17,7 @@ use crate::{
quoted_printable::decode_quoted_printable, DecodeFnc, DecodeResult, quoted_printable::decode_quoted_printable, DecodeFnc, DecodeResult,
}, },
ContentType, HeaderName, HeaderValue, Message, MessageAttachment, MessagePart, MessagePartId, ContentType, HeaderName, HeaderValue, Message, MessageAttachment, MessagePart, MessagePartId,
MessageStructure, Part, RfcHeaders, MessageStructure, MultiPart, Part, RawHeaders, RfcHeader, RfcHeaders,
}; };
use super::{ use super::{
@@ -122,7 +122,7 @@ fn add_missing_type<'x>(
) { ) {
if headers.is_empty() { if headers.is_empty() {
headers.insert( headers.insert(
HeaderName::ContentType, RfcHeader::ContentType,
HeaderValue::ContentType(ContentType { HeaderValue::ContentType(ContentType {
c_type, c_type,
c_subtype: Some(c_subtype), c_subtype: Some(c_subtype),
@@ -194,7 +194,7 @@ impl<'x> Message<'x> {
/// Returns `false` if at least one header field was successfully parsed. /// Returns `false` if at least one header field was successfully parsed.
pub fn is_empty(&self) -> bool { pub fn is_empty(&self) -> bool {
self.headers_rfc.is_empty() && self.headers_other.is_empty() self.headers_rfc.is_empty() && self.headers_raw.is_empty()
} }
/// Parses a byte slice containing the RFC5322 raw message and returns a /// Parses a byte slice containing the RFC5322 raw message and returns a
@@ -213,6 +213,7 @@ impl<'x> Message<'x> {
let mut state_stack = Vec::new(); let mut state_stack = Vec::new();
let mut mime_part_header = RfcHeaders::new(); let mut mime_part_header = RfcHeaders::new();
let mut mime_part_header_raw = RawHeaders::new();
'outer: loop { 'outer: loop {
// Parse headers // Parse headers
@@ -220,8 +221,7 @@ impl<'x> Message<'x> {
message.offset_header = stream.pos; message.offset_header = stream.pos;
if !parse_headers( if !parse_headers(
&mut message.headers_rfc, &mut message.headers_rfc,
Some(&mut message.headers_other), &mut message.headers_raw,
Some(&mut message.headers_offsets),
&mut stream, &mut stream,
) { ) {
break; break;
@@ -229,7 +229,11 @@ impl<'x> Message<'x> {
message.offset_body = seek_crlf_end(&stream, stream.pos); message.offset_body = seek_crlf_end(&stream, stream.pos);
(true, &mut message.headers_rfc) (true, &mut message.headers_rfc)
} else { } else {
if !parse_headers(&mut mime_part_header, None, None, &mut stream) { if !parse_headers(
&mut mime_part_header,
&mut mime_part_header_raw,
&mut stream,
) {
break; break;
} }
(false, &mut mime_part_header) (false, &mut mime_part_header)
@@ -238,7 +242,7 @@ impl<'x> Message<'x> {
state.parts += 1; state.parts += 1;
let content_type = header let content_type = header
.get(&HeaderName::ContentType) .get(&RfcHeader::ContentType)
.and_then(|c| c.as_content_type_ref()); .and_then(|c| c.as_content_type_ref());
let (is_multipart, mut is_inline, mut is_text, mut mime_type) = let (is_multipart, mut is_inline, mut is_text, mut mime_type) =
@@ -269,8 +273,9 @@ impl<'x> Message<'x> {
}; };
if !is_message { if !is_message {
add_missing_type(&mut mime_part_header, "text".into(), "plain".into()); add_missing_type(&mut mime_part_header, "text".into(), "plain".into());
message.parts.push(MessagePart::Multipart(std::mem::take( message.parts.push(MessagePart::Multipart(MultiPart::new(
&mut mime_part_header, std::mem::take(&mut mime_part_header),
std::mem::take(&mut mime_part_header_raw),
))); )));
} }
state_stack.push(state); state_stack.push(state);
@@ -287,7 +292,7 @@ impl<'x> Message<'x> {
skip_crlf(&mut stream); skip_crlf(&mut stream);
let (is_binary, decode_fnc): (bool, DecodeFnc) = match header let (is_binary, decode_fnc): (bool, DecodeFnc) = match header
.get(&HeaderName::ContentTransferEncoding) .get(&RfcHeader::ContentTransferEncoding)
{ {
Some(HeaderValue::Text(encoding)) if encoding.eq_ignore_ascii_case("base64") => { Some(HeaderValue::Text(encoding)) if encoding.eq_ignore_ascii_case("base64") => {
(false, decode_base64) (false, decode_base64)
@@ -313,7 +318,11 @@ impl<'x> Message<'x> {
..Default::default() ..Default::default()
}; };
add_missing_type(&mut mime_part_header, "message".into(), "rfc822".into()); add_missing_type(&mut mime_part_header, "message".into(), "rfc822".into());
message_stack.push((message, std::mem::take(&mut mime_part_header))); message_stack.push((
message,
std::mem::take(&mut mime_part_header),
std::mem::take(&mut mime_part_header_raw),
));
state_stack.push(state); state_stack.push(state);
message = Message::new(); message = Message::new();
state = new_state; state = new_state;
@@ -331,7 +340,8 @@ impl<'x> Message<'x> {
); );
// Attempt to recover contents of an invalid message // Attempt to recover contents of an invalid message
if bytes_read == 0 { let is_encoding_problem = bytes_read == 0;
if is_encoding_problem {
if stream.pos >= stream.data.len() || (is_binary && state.mime_boundary.is_none()) { if stream.pos >= stream.data.len() || (is_binary && state.mime_boundary.is_none()) {
state.structure.pop(); state.structure.pop();
break; break;
@@ -382,7 +392,7 @@ impl<'x> Message<'x> {
if mime_type != MimeType::Message { if mime_type != MimeType::Message {
let is_inline = is_inline let is_inline = is_inline
&& header && header
.get(&HeaderName::ContentDisposition) .get(&RfcHeader::ContentDisposition)
.map_or_else(|| true, |d| !d.get_content_type().is_attachment()) .map_or_else(|| true, |d| !d.get_content_type().is_attachment())
&& (state.parts == 1 && (state.parts == 1
|| (state.mime_type != MimeType::MultipartRelated || (state.mime_type != MimeType::MultipartRelated
@@ -416,11 +426,39 @@ impl<'x> Message<'x> {
if is_text { if is_text {
let is_html = mime_type == MimeType::TextHtml; let is_html = mime_type == MimeType::TextHtml;
let text_part = Part { let mut text_part = Part {
body: result_to_string(bytes, stream.data, content_type), body: result_to_string(bytes, stream.data, content_type),
headers: std::mem::take(&mut mime_part_header), headers_rfc: std::mem::take(&mut mime_part_header),
headers_raw: std::mem::take(&mut mime_part_header_raw),
is_encoding_problem,
}; };
// If there is a single part in the message, move MIME headers
// to the part
if is_message {
for header_name in [
RfcHeader::ContentType,
RfcHeader::ContentDisposition,
RfcHeader::ContentId,
RfcHeader::ContentLanguage,
RfcHeader::ContentLocation,
RfcHeader::ContentTransferEncoding,
RfcHeader::ContentDescription,
] {
if let Some(value) = message.headers_rfc.remove(&header_name) {
text_part.headers_rfc.insert(header_name, value);
}
if let Some(value) =
message.headers_raw.get(&HeaderName::Rfc(header_name))
{
text_part
.headers_raw
.insert(HeaderName::Rfc(header_name), value.to_vec());
}
}
}
add_missing_type(&mut text_part.headers_rfc, "text".into(), "plain".into());
if add_to_html && !is_html { if add_to_html && !is_html {
message.html_body.push(message.parts.len()); message.html_body.push(message.parts.len());
} else if add_to_text && is_html { } else if add_to_text && is_html {
@@ -450,11 +488,38 @@ impl<'x> Message<'x> {
message.attachments.push(message.parts.len()); message.attachments.push(message.parts.len());
let binary_part = Part::new( let mut binary_part = Part::new(
std::mem::take(&mut mime_part_header), std::mem::take(&mut mime_part_header),
std::mem::take(&mut mime_part_header_raw),
result_to_bytes(bytes, stream.data), result_to_bytes(bytes, stream.data),
is_encoding_problem,
); );
// If there is a single part in the message, move MIME headers
// to the part
if is_message {
for header_name in [
RfcHeader::ContentType,
RfcHeader::ContentDisposition,
RfcHeader::ContentId,
RfcHeader::ContentLanguage,
RfcHeader::ContentLocation,
RfcHeader::ContentTransferEncoding,
RfcHeader::ContentDescription,
] {
if let Some(value) = message.headers_rfc.remove(&header_name) {
binary_part.headers_rfc.insert(header_name, value);
}
if let Some(value) =
message.headers_raw.get(&HeaderName::Rfc(header_name))
{
binary_part
.headers_raw
.insert(HeaderName::Rfc(header_name), value.to_vec());
}
}
}
message.parts.push(if !is_inline { message.parts.push(if !is_inline {
MessagePart::Binary(binary_part) MessagePart::Binary(binary_part)
} else { } else {
@@ -466,7 +531,9 @@ impl<'x> Message<'x> {
message.attachments.push(message.parts.len()); message.attachments.push(message.parts.len());
message.parts.push(MessagePart::Message(Part::new( message.parts.push(MessagePart::Message(Part::new(
std::mem::take(&mut mime_part_header), std::mem::take(&mut mime_part_header),
std::mem::take(&mut mime_part_header_raw),
MessageAttachment::Raw(result_to_bytes(bytes, stream.data)), MessageAttachment::Raw(result_to_bytes(bytes, stream.data)),
is_encoding_problem,
))); )));
} }
@@ -477,8 +544,10 @@ impl<'x> Message<'x> {
'inner: loop { 'inner: loop {
if let MimeType::Message = state.mime_type { if let MimeType::Message = state.mime_type {
// Finished processing nested message, restore parent message from stack // Finished processing nested message, restore parent message from stack
if let (Some((mut prev_message, headers)), Some(mut prev_state)) = if let (
(message_stack.pop(), state_stack.pop()) Some((mut prev_message, headers, headers_raw)),
Some(mut prev_state),
) = (message_stack.pop(), state_stack.pop())
{ {
message.structure = state.get_structure(); message.structure = state.get_structure();
message.offset_end = seek_crlf_end(&stream, last_part_offset); message.offset_end = seek_crlf_end(&stream, last_part_offset);
@@ -487,7 +556,9 @@ impl<'x> Message<'x> {
prev_message.attachments.push(prev_message.parts.len()); prev_message.attachments.push(prev_message.parts.len());
prev_message.parts.push(MessagePart::Message(Part::new( prev_message.parts.push(MessagePart::Message(Part::new(
headers, headers,
headers_raw,
MessageAttachment::Parsed(Box::new(message)), MessageAttachment::Parsed(Box::new(message)),
false,
))); )));
message = prev_message; message = prev_message;
prev_state.mime_boundary = state.mime_boundary; prev_state.mime_boundary = state.mime_boundary;
@@ -551,7 +622,7 @@ impl<'x> Message<'x> {
} }
} }
while let (Some((mut prev_message, headers)), Some(prev_state)) = while let (Some((mut prev_message, headers, headers_raw)), Some(prev_state)) =
(message_stack.pop(), state_stack.pop()) (message_stack.pop(), state_stack.pop())
{ {
message.offset_end = stream.pos; message.offset_end = stream.pos;
@@ -561,7 +632,9 @@ impl<'x> Message<'x> {
prev_message.attachments.push(prev_message.parts.len()); prev_message.attachments.push(prev_message.parts.len());
prev_message.parts.push(MessagePart::Message(Part::new( prev_message.parts.push(MessagePart::Message(Part::new(
headers, headers,
headers_raw,
MessageAttachment::Parsed(Box::new(message)), MessageAttachment::Parsed(Box::new(message)),
false,
))); )));
} }
message = prev_message; message = prev_message;
@@ -587,7 +660,7 @@ mod tests {
use crate::parsers::message::Message; use crate::parsers::message::Message;
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes(); const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----".as_bytes();
#[test] #[test]
fn parse_full_messages() { fn parse_full_messages() {
+2
View File
@@ -11,5 +11,7 @@
pub mod fields; pub mod fields;
pub mod header; pub mod header;
pub mod mbox;
pub mod message; pub mod message;
pub mod mime; pub mod mime;
pub mod preview;
+173
View File
@@ -0,0 +1,173 @@
/*
* Copyright Stalwart Labs, Minter Ltd. See the COPYING
* file at the top-level directory of this distribution.
*
* Licensed under the Apache License, Version 2.0 <LICENSE-APACHE or
* https://www.apache.org/licenses/LICENSE-2.0> or the MIT license
* <LICENSE-MIT or https://opensource.org/licenses/MIT>, at your
* option. This file may not be copied, modified, or distributed
* except according to those terms.
*/
use std::borrow::Cow;
use crate::decoders::html::html_to_text;
pub fn preview_html<'x, 'y>(html: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
preview_text(html_to_text(html.as_ref()).into(), max_len)
}
pub fn preview_text<'x, 'y>(text: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
if text.len() > max_len {
let mut result = String::with_capacity(max_len);
for ch in text.chars() {
if ch.len_utf8() + result.len() + 3 > max_len {
break;
}
result.push(ch);
}
result.push_str("...");
result.into()
} else {
text.into_owned().into()
}
}
pub fn truncate_text<'x, 'y>(text: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
preview_text(text, max_len)
}
pub fn truncate_html<'x, 'y>(html: Cow<'y, str>, max_len: usize) -> Cow<'x, str> {
if html.len() > max_len {
let mut result = String::with_capacity(max_len);
let mut in_tag = false;
let mut in_comment = false;
let mut last_tag_end_pos = 0;
for (pos, ch) in html.char_indices() {
let mut set_last_tag = 0;
match ch {
'<' if !in_tag => {
in_tag = true;
if let Some("!--") = html.get(pos + 1..pos + 4) {
in_comment = true;
}
set_last_tag = pos;
}
'>' if in_tag => {
if in_comment {
if let Some("--") = html.get(pos - 2..pos) {
in_comment = false;
in_tag = false;
set_last_tag = pos + 1;
}
} else {
in_tag = false;
set_last_tag = pos + 1;
}
}
_ => (),
}
if ch.len_utf8() + pos + 3 > max_len {
result.push_str(
&html[0..if (in_tag || set_last_tag > 0) && last_tag_end_pos > 0 {
last_tag_end_pos
} else {
pos
}],
);
result.push_str("...");
break;
} else if set_last_tag > 0 {
last_tag_end_pos = set_last_tag;
}
}
result.into()
} else {
html.into_owned().into()
}
}
#[cfg(test)]
mod tests {
#[test]
fn text_preview() {
let text_1 = concat!(
"J'interdis aux marchands de vanter trop leurs marchandises. ",
"Car ils se fontvite pédagogues et t'enseignent comme but ce qui ",
"n'est par essence qu'un moyen, et te trompant ainsi sur la route ",
"à suivre les voilà bientôt qui te dégradent, car si leur musique ",
"est vulgaire ils te fabriquent pour te la vendre une âme vulgaire.\n",
"— Antoine de Saint-Exupéry, Citadelle (1948)"
);
let text_2 = concat!(
"長沮、桀溺耦而耕,孔子過之,使子路問津焉。長沮曰:「夫執輿者為誰?」",
"子路曰:「為孔丘。」曰:「是魯孔丘與?」曰:「是也。」曰:「是知津矣。」問於桀溺,",
"桀溺曰:「子為誰?」曰:「為仲由。」曰:「是魯孔丘之徒與?」對曰:「然。",
"」曰:「滔滔者天下皆是也,而誰以易之?且而與其從辟人之士也,豈若從",
"辟世之士哉?」耰而不輟。子路行以告。夫子憮然曰:「鳥獸不可與同群,吾非斯人之徒",
"與而誰與?天下有道,丘不與易也。」",
"子路從而後,遇丈人,以杖荷蓧。子路問曰:「子見夫子乎?」丈人曰:「四體不勤,",
"五穀不分。孰為夫子?」植其杖而芸。子路拱而立。止子路宿,殺雞為黍而食之,見其二",
"子焉。明日,子路行以告。子曰:「隱者也。」使子路反見之。至則行矣。子路曰:「",
"不仕無義。長幼之節,不可廢也;君臣之義,如之何其廢之?欲潔其身,而亂大倫。君",
"子之仕也,行其義也。道之不行,已知之矣。」"
);
assert_eq!(
super::truncate_text(text_1.into(), 110),
"J'interdis aux marchands de vanter trop leurs marchandises. Car ils se fontvite pédagogues et t'enseignent..."
);
assert_eq!(
super::truncate_text(text_2.into(), 110),
"長沮、桀溺耦而耕,孔子過之,使子路問津焉。長沮曰:「夫執輿者為誰?」子..."
);
}
#[test]
fn html_truncate() {
for (html, expected_result) in [
(
"<html>hello<br/>world<br/></html>",
"<html>hello<br/>world...",
),
("<html>using &lt;><br/></html>", "<html>using &lt;><br/>..."),
(
"test <not br/>tag<br />test <not br/>tag<br />",
"test <not br/>tag...",
),
(
"<>< ><tag\n/>>hello world< br \n />",
"<>< ><tag\n/>>hello ...",
),
(
concat!(
"<head><title>ignore head</title><not head>xyz</not head></head>",
"<h1>&lt;body&gt;</h1>"
),
"<head><title>ignore he...",
),
(
concat!(
"<p>what is &heartsuit;?</p><p>&#x000DF;&Abreve;&#914;&gamma; ",
"don&apos;t hurt me.</p>"
),
"<p>what is &heartsuit;...",
),
(
"<!-- <> < < < -->the actual<!--> text",
"<!-- <> < < < -->the a...",
),
(
" < p > hello < / p > < p > world < / p > !!! < br > ",
" < p > hello ...",
),
(
" <p>please unsubscribe <a href=#>here</a>.</p> ",
" <p>please unsubscribe...",
),
] {
assert_eq!(super::truncate_html(html.into(), 25), expected_result);
}
}
}
+32 -27
View File
@@ -57,35 +57,33 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
let message = Message::parse(input).unwrap(); let message = Message::parse(input).unwrap();
assert_eq!( assert_eq!(
message.get_from(), bincode::deserialize::<RfcHeaders>(&bincode::serialize(&message.headers_rfc).unwrap())
&HeaderValue::Address(Addr { .unwrap(),
name: Some("Art Vandelay (Vandelay Industries)".into()), message.headers_rfc
address: Some("art@vandelay.com".into())
})
); );
assert_eq!(
message.get_from(),
&HeaderValue::Address(Addr::new(
"Art Vandelay (Vandelay Industries)".into(),
"art@vandelay.com"
))
);
assert_eq!( assert_eq!(
message.get_to(), message.get_to(),
&HeaderValue::GroupList(vec![ &HeaderValue::GroupList(vec![
Group { Group::new(
name: Some("Colleagues".into()), "Colleagues",
addresses: vec![Addr { vec![Addr::new("James Smythe".into(), "james@vandelay.com")]
name: Some("James Smythe".into()), ),
address: Some("james@vandelay.com".into()) Group::new(
}] "Friends",
}, vec![
Group { Addr::new(None, "jane@example.com"),
name: Some("Friends".into()), Addr::new("John Smîth".into(), "john@example.com"),
addresses: vec![
Addr {
name: None,
address: Some("jane@example.com".into())
},
Addr {
name: Some("John Smîth".into()),
address: Some("john@example.com".into())
}
] ]
} )
]) ])
); );
@@ -93,10 +91,12 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
message.get_date().unwrap().to_iso8601(), message.get_date().unwrap().to_iso8601(),
"2021-11-20T14:22:01-08:00" "2021-11-20T14:22:01-08:00"
); );
assert_eq!( assert_eq!(
message.get_subject().unwrap(), message.get_subject().unwrap(),
"Why not both importing AND exporting? ☺" "Why not both importing AND exporting? ☺"
); );
assert_eq!( assert_eq!(
message.get_html_body(0).unwrap(), message.get_html_body(0).unwrap(),
concat!( concat!(
@@ -105,6 +105,7 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
" why not do both? &#x263A;</p></html>" " why not do both? &#x263A;</p></html>"
) )
); );
assert_eq!( assert_eq!(
message.get_text_body(0).unwrap(), message.get_text_body(0).unwrap(),
concat!( concat!(
@@ -112,26 +113,30 @@ R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7
" “importing”,\nbut then I thought, why not do both? ☺\n" " “importing”,\nbut then I thought, why not do both? ☺\n"
) )
); );
let nested_message = message.get_attachment(0).unwrap().unwrap_message(); let nested_message = message.get_attachment(0).unwrap().unwrap_message();
assert_eq!( assert_eq!(
nested_message.get_subject().unwrap(), nested_message.get_subject().unwrap(),
"Exporting my book about coffee tables" "Exporting my book about coffee tables"
); );
assert_eq!( assert_eq!(
nested_message.get_text_body(0).unwrap(), nested_message.get_text_body(0).unwrap(),
"ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!" "ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!"
); );
assert_eq!( assert_eq!(
nested_message.get_html_body(0).unwrap(), nested_message.get_html_body(0).unwrap(),
"<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>" "<html><body>ℌ𝔢𝔩𝔭 𝔪𝔢 𝔢𝔵𝔭𝔬𝔯𝔱 𝔪𝔶 𝔟𝔬𝔬𝔨 𝔭𝔩𝔢𝔞𝔰𝔢!</body></html>"
); );
let nested_attachment = nested_message.get_attachment(0).unwrap().unwrap_binary(); let nested_attachment = nested_message.get_attachment(0).unwrap().unwrap_binary();
assert_eq!(nested_attachment.len(), 42); assert_eq!(nested_attachment.len(), 42);
assert_eq!( assert_eq!(
nested_attachment.get_attachment_name().unwrap(), nested_attachment.get_attachment_name().unwrap(),
"Book about ☕ tables.gif" "Book about ☕ tables.gif"
); );
//println!("{}", serde_json::to_string_pretty(&message).unwrap());
//println!("{}", serde_yaml::to_string(&message).unwrap());
} }
+37 -149
View File
@@ -42,26 +42,10 @@ QzMvhGqnm2V0WiClm///D0lfXHtJ6vLlK9w7rx7vQk5SQJbFtSms1y9evXid7QZacgOxmSxktNzd
tSwwU+J/VICaCPFIYU3XAJhIOtjf5sfyAAAAJXRFWHRDb21tZW50AGNsaXAyZ2lmIHYuMC42IGJ5 tSwwU+J/VICaCPFIYU3XAJhIOtjf5sfyAAAAJXRFWHRDb21tZW50AGNsaXAyZ2lmIHYuMC42IGJ5
IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg== IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -76,153 +60,57 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com"
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"mime_version": { "subject": {
"Text": "1.0" "Text": "Test message from Microsoft Outlook 00"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"headers_other": { "html_body": [],
"X-MSMail-Priority": { "text_body": [],
"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-Priority": {
"Text": "3 (Normal)"
},
"Importance": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 291
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 317,
"end": 326
},
{
"name": {
"Rfc": "content_disposition"
},
"start": 346,
"end": 385
},
{
"name": {
"Other": "X-Priority"
},
"start": 396,
"end": 409
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 427,
"end": 436
},
{
"name": {
"Other": "X-Mailer"
},
"start": 445,
"end": 498
},
{
"name": {
"Other": "Importance"
},
"start": 509,
"end": 518
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 528,
"end": 576
}
],
"attachments": [ "attachments": [
0 0
], ],
"parts": [ "parts": [
{ {
"Binary": { "Binary": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": {
"name": "redball.png"
}
}
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
}
},
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+23 -130
View File
@@ -33,18 +33,20 @@ ihr seht, einige Tiere, welche also wohl noch ungl+APw-cklicher sein =
m+APw-ssen als wir.+ACI-=20 m+APw-ssen als wir.+ACI-=20
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"to": { "to": {
"AddressList": [ "AddressList": [
{ {
@@ -60,15 +62,6 @@ m+APw-ssen als wir.+ACI-=20
"subject": { "subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
}, },
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
}
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -81,133 +74,33 @@ m+APw-ssen als wir.+ACI-=20
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_other": {
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"Importance": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 39
},
{
"name": {
"Rfc": "to"
},
"start": 42,
"end": 146
},
{
"name": {
"Rfc": "subject"
},
"start": 154,
"end": 224
},
{
"name": {
"Rfc": "date"
},
"start": 229,
"end": 262
},
{
"name": {
"Rfc": "message_id"
},
"start": 273,
"end": 322
},
{
"name": {
"Rfc": "mime_version"
},
"start": 335,
"end": 340
},
{
"name": {
"Rfc": "content_type"
},
"start": 353,
"end": 383
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 409,
"end": 427
},
{
"name": {
"Other": "X-Priority"
},
"start": 438,
"end": 450
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 468,
"end": 476
},
{
"name": {
"Other": "X-Mailer"
},
"start": 485,
"end": 537
},
{
"name": {
"Other": "Importance"
},
"start": 548,
"end": 556
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 566,
"end": 613
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+31 -118
View File
@@ -35,14 +35,13 @@ wir.&quot; <br>
</font></html> </font></html>
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder", },
"address": "dwsauder@example.com" "message_id": {
} "Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
}, },
"to": { "to": {
"Address": { "Address": {
@@ -50,27 +49,6 @@ wir.&quot; <br>
"address": "mueller@example.com" "address": "mueller@example.com"
} }
}, },
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"message_id": {
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -83,107 +61,42 @@ wir.&quot; <br>
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
} }
}, },
"headers_other": {
"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)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 290
},
{
"name": {
"Rfc": "from"
},
"start": 295,
"end": 332
},
{
"name": {
"Rfc": "subject"
},
"start": 340,
"end": 387
},
{
"name": {
"Rfc": "mime_version"
},
"start": 400,
"end": 406
},
{
"name": {
"Rfc": "content_type"
},
"start": 419,
"end": 453
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 479,
"end": 498
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Html": { "Html": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "html",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"is_encoding_problem": false,
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font></html>\n\n" "body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font></html>\n\n"
} }
} }
+15 -96
View File
@@ -62,12 +62,8 @@ wir.&quot; <br>
--=====================_714967308==_.ALT-- --=====================_714967308==_.ALT--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -81,6 +77,12 @@ wir.&quot; <br>
"tz_minute": 0 "tz_minute": 0
} }
}, },
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -90,15 +92,12 @@ wir.&quot; <br>
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519002557.00a88870@pop.example.com" "Text": "4.2.0.58.20000519002557.00a88870@pop.example.com"
}, },
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -109,99 +108,17 @@ wir.&quot; <br>
} }
} }
}, },
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 290
},
{
"name": {
"Rfc": "from"
},
"start": 295,
"end": 332
},
{
"name": {
"Rfc": "subject"
},
"start": 340,
"end": 387
},
{
"name": {
"Rfc": "mime_version"
},
"start": 400,
"end": 406
},
{
"name": {
"Rfc": "content_type"
},
"start": 419,
"end": 496
}
],
"html_body": [ "html_body": [
1 1
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
@@ -215,12 +132,13 @@ wir.&quot; <br>
} }
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
@@ -234,6 +152,7 @@ wir.&quot; <br>
} }
} }
}, },
"is_encoding_problem": false,
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font></html>\n" "body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font></html>\n"
} }
} }
+28 -108
View File
@@ -17,14 +17,13 @@ A HARE one day ridiculed the short feet and slow pace of the Tortoise, who repli
Slow but steady wins the race. Slow but steady wins the race.
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": { "to": {
"Text": "The Hare and the Tortoise" "Address": {
}, "name": "Joe Blow",
"mime_version": { "address": "blow@example.com"
"Text": "1.0" }
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -39,123 +38,44 @@ Slow but steady wins the race.
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "The Hare and the Tortoise"
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"message_id": {
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Priority": {
"Text": "5 (Lowest)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 194
},
{
"name": {
"Rfc": "date"
},
"start": 199,
"end": 233
},
{
"name": {
"Rfc": "to"
},
"start": 236,
"end": 266
},
{
"name": {
"Rfc": "from"
},
"start": 271,
"end": 308
},
{
"name": {
"Rfc": "subject"
},
"start": 316,
"end": 344
},
{
"name": {
"Rfc": "mime_version"
},
"start": 357,
"end": 363
},
{
"name": {
"Rfc": "content_type"
},
"start": 376,
"end": 409
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
} }
+30 -137
View File
@@ -31,14 +31,13 @@ Ers+AOQ-ufen noch ein wenig aufschieben, denn auch uns f+APw-rchten, wie =
ihr seht, einige Tiere, welche also wohl noch ungl+APw-cklicher sein = ihr seht, einige Tiere, welche also wohl noch ungl+APw-cklicher sein =
m+APw-ssen als wir.+ACI-=20 m+APw-ssen als wir.+ACI-=20
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": { "to": {
"Text": "1.0" "Address": {
}, "name": "Heinz Müller",
"subject": { "address": "mueller@example.com"
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" }
}, },
"from": { "from": {
"Address": { "Address": {
@@ -46,6 +45,12 @@ m+APw-ssen als wir.+ACI-=20
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -59,147 +64,35 @@ m+APw-ssen als wir.+ACI-=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_transfer_encoding": { "mime_version": {
"Text": "quoted-printable" "Text": "1.0"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
}
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
} }
}, },
"headers_other": {
"X-Priority": {
"Text": "3 (Normal)"
},
"Importance": {
"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-MSMail-Priority": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 96
},
{
"name": {
"Rfc": "subject"
},
"start": 104,
"end": 175
},
{
"name": {
"Rfc": "date"
},
"start": 180,
"end": 214
},
{
"name": {
"Rfc": "message_id"
},
"start": 225,
"end": 275
},
{
"name": {
"Rfc": "mime_version"
},
"start": 288,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 339
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 365,
"end": 384
},
{
"name": {
"Other": "X-Priority"
},
"start": 395,
"end": 408
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 426,
"end": 435
},
{
"name": {
"Other": "X-Mailer"
},
"start": 444,
"end": 497
},
{
"name": {
"Other": "Importance"
},
"start": 508,
"end": 517
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 527,
"end": 575
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-7"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+35 -133
View File
@@ -82,13 +82,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
------=_NextPart_000_0004_01BFC037.28F2FA90-- ------=_NextPart_000_0004_01BFC037.28F2FA90--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": { "content_type": {
"Address": { "ContentType": {
"name": "Joe Blow", "c_type": "multipart",
"address": "jblow@example.com" "c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
}
} }
}, },
"from": { "from": {
@@ -97,11 +99,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"message_id": { "subject": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com" "Text": "Test message from Microsoft Outlook 00"
},
"mime_version": {
"Text": "1.0"
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -116,122 +115,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": { "to": {
"ContentType": { "Address": {
"c_type": "multipart", "name": "Joe Blow",
"c_subtype": "mixed", "address": "jblow@example.com"
"attributes": {
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
}
} }
}, },
"subject": { "message_id": {
"Text": "Test message from Microsoft Outlook 00" "Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com"
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_other": { "html_body": [],
"X-MimeOLE": { "text_body": [],
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 331
},
{
"name": {
"Other": "X-Priority"
},
"start": 342,
"end": 355
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 373,
"end": 382
},
{
"name": {
"Other": "X-Mailer"
},
"start": 391,
"end": 444
},
{
"name": {
"Other": "Importance"
},
"start": 455,
"end": 464
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 474,
"end": 522
}
],
"attachments": [ "attachments": [
0, 0,
1 1
@@ -239,13 +137,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "blueball.png" "filename": "blueball.png"
} }
@@ -261,6 +160,7 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1592,7 +1492,16 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1604,16 +1513,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+28 -135
View File
@@ -30,8 +30,7 @@ ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige =
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": { "to": {
"Address": { "Address": {
@@ -39,20 +38,8 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"address": "schmuergen@example.com" "address": "schmuergen@example.com"
} }
}, },
"from": { "subject": {
"Address": { "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -67,138 +54,44 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": { "mime_version": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)" "Text": "1.0"
}, },
"content_type": { "message_id": {
"ContentType": { "Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
"c_type": "text", },
"c_subtype": "plain", "from": {
"attributes": { "Address": {
"charset": "iso-8859-1" "name": "Doug Sauder",
} "address": "doug@example.com"
} }
} }
}, },
"headers_other": {
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 112
},
{
"name": {
"Rfc": "subject"
},
"start": 120,
"end": 194
},
{
"name": {
"Rfc": "date"
},
"start": 199,
"end": 233
},
{
"name": {
"Rfc": "message_id"
},
"start": 244,
"end": 294
},
{
"name": {
"Rfc": "mime_version"
},
"start": 307,
"end": 313
},
{
"name": {
"Rfc": "content_type"
},
"start": 326,
"end": 363
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 389,
"end": 408
},
{
"name": {
"Other": "X-Priority"
},
"start": 419,
"end": 432
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 450,
"end": 459
},
{
"name": {
"Other": "X-Mailer"
},
"start": 468,
"end": 521
},
{
"name": {
"Other": "Importance"
},
"start": 532,
"end": 541
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 551,
"end": 599
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+54 -151
View File
@@ -134,15 +134,26 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
------=_NextPart_000_0002_01BFC036.AE309650-- ------=_NextPart_000_0002_01BFC036.AE309650--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
}
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"to": { "to": {
"Address": { "Address": {
"name": "Heinz Müller", "name": "Heinz Müller",
@@ -162,128 +173,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
}
}
},
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com"
}, },
"subject": { "mime_version": {
"Text": "Test message from Microsoft Outlook 00" "Text": "1.0"
} }
}, },
"headers_other": {
"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-Priority": {
"Text": "3 (Normal)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 99
},
{
"name": {
"Rfc": "subject"
},
"start": 107,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 354
},
{
"name": {
"Other": "X-Priority"
},
"start": 365,
"end": 378
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 396,
"end": 405
},
{
"name": {
"Other": "X-Mailer"
},
"start": 414,
"end": 467
},
{
"name": {
"Other": "Importance"
},
"start": 478,
"end": 487
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 497,
"end": 545
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -298,7 +194,10 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -307,17 +206,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -330,15 +230,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "blueball.png" "filename": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1670,7 +1569,19 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1679,19 +1590,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -2996,18 +2897,7 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3016,8 +2906,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "redball.png" "name": "redball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+30 -127
View File
@@ -35,34 +35,8 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"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",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1",
"format": "flowed"
}
}
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -84,117 +58,46 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"message_id": {
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
} }
}, },
"headers_other": {
"Disposition-Notification-To": {
"Text": "<dwsauder@example.com>"
},
"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"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "Disposition-Notification-To"
},
"start": 141,
"end": 166
},
{
"name": {
"Other": "X-Mailer"
},
"start": 175,
"end": 223
},
{
"name": {
"Other": "X-Priority"
},
"start": 234,
"end": 248
},
{
"name": {
"Rfc": "date"
},
"start": 253,
"end": 287
},
{
"name": {
"Rfc": "to"
},
"start": 290,
"end": 373
},
{
"name": {
"Rfc": "from"
},
"start": 378,
"end": 415
},
{
"name": {
"Rfc": "subject"
},
"start": 423,
"end": 468
},
{
"name": {
"Rfc": "mime_version"
},
"start": 481,
"end": 487
},
{
"name": {
"Rfc": "content_type"
},
"start": 500,
"end": 550
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 576,
"end": 595
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1",
"format": "flowed"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+25 -112
View File
@@ -20,11 +20,10 @@ In einem nahen Teich wollten sie sich nun ers
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_transfer_encoding": { "subject": {
"Text": "8bit" "Text": "Die Hasen und die Fr�sche"
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -39,136 +38,50 @@ In einem nahen Teich wollten sie sich nun ers
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Fr�sche"
},
"to": { "to": {
"Address": { "Address": {
"name": "Heinz M�ller", "name": "Heinz M�ller",
"address": "mueller@example.com" "address": "mueller@example.com"
} }
}, },
"message_id": {
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
},
"mime_version": {
"Text": "1.0"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_other": {
"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)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 195
},
{
"name": {
"Rfc": "date"
},
"start": 200,
"end": 234
},
{
"name": {
"Rfc": "to"
},
"start": 237,
"end": 274
},
{
"name": {
"Rfc": "from"
},
"start": 279,
"end": 316
},
{
"name": {
"Rfc": "subject"
},
"start": 324,
"end": 352
},
{
"name": {
"Rfc": "mime_version"
},
"start": 365,
"end": 371
},
{
"name": {
"Rfc": "content_type"
},
"start": 384,
"end": 419
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 445,
"end": 452
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "8bit"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+22 -99
View File
@@ -28,18 +28,11 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com" "Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com"
}, },
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
@@ -52,17 +45,8 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"address": "jschmuergen@example.com" "address": "jschmuergen@example.com"
} }
}, },
"mime_version": { "subject": {
"Text": "1.0" "Text": "Die Hasen und die Frösche"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -76,97 +60,36 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 299
},
{
"name": {
"Rfc": "from"
},
"start": 304,
"end": 341
},
{
"name": {
"Rfc": "subject"
},
"start": 349,
"end": 396
},
{
"name": {
"Rfc": "mime_version"
},
"start": 409,
"end": 415
},
{
"name": {
"Rfc": "content_type"
},
"start": 428,
"end": 463
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 489,
"end": 508
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+35 -142
View File
@@ -29,9 +29,26 @@ sie aufs schnellste untertauchten.=20
ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige = ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige =
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -47,157 +64,33 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
}, },
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "Windows-1252"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
} }
}, },
"headers_other": {
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"Importance": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 101
},
{
"name": {
"Rfc": "subject"
},
"start": 109,
"end": 185
},
{
"name": {
"Rfc": "date"
},
"start": 190,
"end": 224
},
{
"name": {
"Rfc": "message_id"
},
"start": 235,
"end": 285
},
{
"name": {
"Rfc": "mime_version"
},
"start": 298,
"end": 304
},
{
"name": {
"Rfc": "content_type"
},
"start": 317,
"end": 356
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 382,
"end": 401
},
{
"name": {
"Other": "X-Priority"
},
"start": 412,
"end": 425
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 443,
"end": 452
},
{
"name": {
"Other": "X-Mailer"
},
"start": 461,
"end": 514
},
{
"name": {
"Other": "Importance"
},
"start": 525,
"end": 534
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 544,
"end": 592
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "Windows-1252"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+27 -134
View File
@@ -30,26 +30,10 @@ wenig aufschieben, denn auch uns f
welche also wohl noch unglücklicher sein müssen als wir." welche also wohl noch unglücklicher sein müssen als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "message_id": {
"ContentType": { "Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
}, },
"to": { "to": {
"Address": { "Address": {
@@ -57,14 +41,17 @@ welche also wohl noch ungl
"address": "schmuergen@example.com" "address": "schmuergen@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"message_id": { "from": {
"Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com" "Address": {
}, "name": "Doug Sauder",
"content_transfer_encoding": { "address": "doug@example.com"
"Text": "8bit" }
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -80,125 +67,31 @@ welche also wohl noch ungl
} }
} }
}, },
"headers_other": {
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 112
},
{
"name": {
"Rfc": "subject"
},
"start": 120,
"end": 194
},
{
"name": {
"Rfc": "date"
},
"start": 199,
"end": 233
},
{
"name": {
"Rfc": "message_id"
},
"start": 244,
"end": 294
},
{
"name": {
"Rfc": "mime_version"
},
"start": 307,
"end": 313
},
{
"name": {
"Rfc": "content_type"
},
"start": 326,
"end": 363
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 389,
"end": 396
},
{
"name": {
"Other": "X-Priority"
},
"start": 407,
"end": 420
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 438,
"end": 447
},
{
"name": {
"Other": "X-Mailer"
},
"start": 456,
"end": 509
},
{
"name": {
"Other": "Importance"
},
"start": 520,
"end": 529
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 539,
"end": 587
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "8bit"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+25 -126
View File
@@ -71,20 +71,28 @@ race.&nbsp;=20
------=_NextPart_000_0005_01BFC037.799BEF60-- ------=_NextPart_000_0005_01BFC037.799BEF60--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"from": { "to": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Joe Blow",
"address": "doug@example.com" "address": "jblow@example.com"
} }
}, },
"mime_version": {
"Text": "1.0"
},
"subject": { "subject": {
"Text": "Test message from Microsoft Outlook 00" "Text": "Test message from Microsoft Outlook 00"
}, },
"message_id": { "content_type": {
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com" "ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
}
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -99,138 +107,27 @@ race.&nbsp;=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": { "from": {
"Text": "1.0"
},
"to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Doug Sauder",
"address": "jblow@example.com" "address": "doug@example.com"
} }
}, },
"content_type": { "message_id": {
"ContentType": { "Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
}
}
} }
}, },
"headers_other": {
"Importance": {
"Text": "Normal"
},
"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)"
},
"X-MSMail-Priority": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 337
},
{
"name": {
"Other": "X-Priority"
},
"start": 348,
"end": 361
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 379,
"end": 388
},
{
"name": {
"Other": "X-Mailer"
},
"start": 397,
"end": 450
},
{
"name": {
"Other": "Importance"
},
"start": 461,
"end": 470
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 480,
"end": 528
}
],
"html_body": [ "html_body": [
1 1
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -244,12 +141,13 @@ race.&nbsp;=20
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -263,6 +161,7 @@ race.&nbsp;=20
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n" "body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n"
} }
} }
+76 -146
View File
@@ -197,11 +197,13 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
--=====================_715392540==_-- --=====================_715392540==_--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": { "from": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com" "Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -216,24 +218,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": {
"Text": "1.0"
},
"to": { "to": {
"Address": { "Address": {
"name": "Heinz Müller", "name": "Heinz Müller",
"address": "mueller@example.com" "address": "mueller@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -242,91 +235,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"boundary": "=====================_715392540==_" "boundary": "=====================_715392540==_"
} }
} }
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com"
} }
}, },
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 482
}
],
"html_body": [ "html_body": [
3 3
], ],
@@ -342,13 +258,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "related", "c_type": "multipart",
"attributes": { "c_subtype": "related",
"type": "multipart/alternative", "attributes": {
"boundary": "=====================_715392540==_.REL" "type": "multipart/alternative",
"boundary": "=====================_715392540==_.REL"
}
} }
} }
} }
@@ -356,12 +274,14 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "=====================_715392550==_.ALT" "attributes": {
"boundary": "=====================_715392550==_.ALT"
}
} }
} }
} }
@@ -369,7 +289,7 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -383,12 +303,13 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -402,15 +323,13 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.2\" width=27 height=27 alt=\"2aa3ed95.png\"><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.3\" width=27 height=27 alt=\"2aa3edd1.png\"></html>\n" "body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.2\" width=27 height=27 alt=\"2aa3ed95.png\"><img src=\"cid:4.2.0.58.20000519003556.00a918e0@pop.example.com.3\" width=27 height=27 alt=\"2aa3edd1.png\"></html>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -426,12 +345,17 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "2aa3ed95.png" "filename": "2aa3ed95.png"
} }
} }
},
"content_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1763,15 +1687,22 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "2aa3edd1.png" "filename": "2aa3edd1.png"
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1780,14 +1711,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "2aa3edd1.png" "name": "2aa3edd1.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -3247,15 +3173,7 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3267,8 +3185,18 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -4600,7 +4528,19 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -4609,19 +4549,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+39 -108
View File
@@ -94,30 +94,26 @@ JB@ac)(GTFLiL)!d09'8!!!:
--=====================_716373961==_-- --=====================_716373961==_--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_716373961==_"
}
}
},
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519005150.00a85230@pop.example.com" "Text": "4.2.0.58.20000519005150.00a85230@pop.example.com"
}, },
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -131,89 +127,19 @@ JB@ac)(GTFLiL)!d09'8!!!:
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": { "subject": {
"ContentType": { "Text": "Die Hasen und die Frösche"
"c_type": "multipart", },
"c_subtype": "mixed", "mime_version": {
"attributes": { "Text": "1.0"
"boundary": "=====================_716373961==_" },
} "to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
} }
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 295
},
{
"name": {
"Rfc": "from"
},
"start": 300,
"end": 337
},
{
"name": {
"Rfc": "subject"
},
"start": 345,
"end": 390
},
{
"name": {
"Rfc": "mime_version"
},
"start": 403,
"end": 409
},
{
"name": {
"Rfc": "content_type"
},
"start": 422,
"end": 489
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -227,10 +153,7 @@ JB@ac)(GTFLiL)!d09'8!!!:
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -239,17 +162,22 @@ JB@ac)(GTFLiL)!d09'8!!!:
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "blueball.png" "filename": "blueball.png"
} }
@@ -265,6 +193,7 @@ JB@ac)(GTFLiL)!d09'8!!!:
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
13, 13,
10, 10,
@@ -2201,7 +2130,16 @@ JB@ac)(GTFLiL)!d09'8!!!:
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "HasenundFr�sche.txt"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
@@ -2210,16 +2148,9 @@ JB@ac)(GTFLiL)!d09'8!!!:
"name": "HasenundFr�sche.txt" "name": "HasenundFr�sche.txt"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
13, 13,
10, 10,
+23 -92
View File
@@ -101,26 +101,25 @@ end
--=====================_716177458==_-- --=====================_716177458==_--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": {
"Text": "The Hare and the Tortoise"
},
"to": { "to": {
"Address": { "Address": {
"name": "J�rgen Schm�rgen", "name": "J�rgen Schm�rgen",
"address": "jschmuergen@example.com" "address": "jschmuergen@example.com"
} }
}, },
"mime_version": { "subject": {
"Text": "1.0" "Text": "The Hare and the Tortoise"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -148,79 +147,6 @@ end
} }
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 257
},
{
"name": {
"Rfc": "from"
},
"start": 262,
"end": 299
},
{
"name": {
"Rfc": "subject"
},
"start": 307,
"end": 335
},
{
"name": {
"Rfc": "mime_version"
},
"start": 348,
"end": 354
},
{
"name": {
"Rfc": "content_type"
},
"start": 367,
"end": 434
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -234,7 +160,7 @@ end
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -245,14 +171,21 @@ end
} }
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_disposition": {
"Text": "x-uuencode" "ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -263,15 +196,11 @@ end
} }
} }
}, },
"content_disposition": { "content_transfer_encoding": {
"ContentType": { "Text": "x-uuencode"
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
13, 13,
10, 10,
@@ -2133,7 +2062,7 @@ end
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -2149,12 +2078,14 @@ end
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "blueball.png" "filename": "blueball.png"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
13, 13,
10, 10,
+53 -129
View File
@@ -137,37 +137,33 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
--=====================_715157131==_.REL-- --=====================_715157131==_.REL--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
"c_subtype": "related", "c_subtype": "related",
"attributes": { "attributes": {
"boundary": "=====================_715157131==_.REL", "type": "multipart/alternative",
"type": "multipart/alternative" "boundary": "=====================_715157131==_.REL"
} }
} }
}, },
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -181,93 +177,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
} }
}, },
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Priority": {
"Text": "2 (High)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 520
}
],
"html_body": [ "html_body": [
2 2
], ],
@@ -281,12 +197,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "=====================_715157141==_.ALT" "attributes": {
"boundary": "=====================_715157141==_.ALT"
}
} }
} }
} }
@@ -294,7 +212,10 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -303,17 +224,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -327,26 +246,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<html>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.0\" width=27 height=27 alt=\"blueball.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.1\" width=27 height=27 alt=\"redball.png\"></font></html>\n" "body": "<html>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.0\" width=27 height=27 alt=\"blueball.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003143.00a8d550@pop.example.com.1\" width=27 height=27 alt=\"redball.png\"></font></html>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -355,8 +261,24 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0"
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1688,7 +1610,7 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1698,21 +1620,23 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_id": {
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "redball.png" "filename": "redball.png"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+77 -173
View File
@@ -143,39 +143,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
------=_NextPart_000_0008_01BFC037.FDD8EE90-- ------=_NextPart_000_0008_01BFC037.FDD8EE90--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
}
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -188,111 +157,38 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
}
}
} }
}, },
"headers_other": {
"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-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 331
},
{
"name": {
"Other": "X-Priority"
},
"start": 342,
"end": 355
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 373,
"end": 382
},
{
"name": {
"Other": "X-Mailer"
},
"start": 391,
"end": 444
},
{
"name": {
"Other": "Importance"
},
"start": 455,
"end": 464
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 474,
"end": 522
}
],
"html_body": [ "html_body": [
2 2
], ],
@@ -306,12 +202,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "----=_NextPart_001_0009_01BFC037.FDD8EE90" "attributes": {
"boundary": "----=_NextPart_001_0009_01BFC037.FDD8EE90"
}
} }
} }
} }
@@ -319,7 +217,10 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -328,17 +229,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -347,28 +249,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><BR><FONT face=Arial size=2>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n" "body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><BR><FONT face=Arial size=2>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n<BR></FONT></DIV></BODY></HTML>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -377,8 +266,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1683,7 +1585,19 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1692,19 +1606,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "redball.png" "name": "redball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "redball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+33 -140
View File
@@ -30,16 +30,24 @@ wenig aufschieben, denn auch uns f
welche also wohl noch unglücklicher sein müssen als wir." welche also wohl noch unglücklicher sein müssen als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "subject": {
"ContentType": { "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
"c_type": "text", },
"c_subtype": "plain", "to": {
"attributes": { "Address": {
"charset": "iso-8859-1" "name": "J�rgen Schm�rgen",
} "address": "schmuergen@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
} }
}, },
"date": { "date": {
@@ -55,150 +63,35 @@ welche also wohl noch ungl
"tz_minute": 0 "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"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
},
"content_transfer_encoding": {
"Text": "8bit"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
} }
}, },
"headers_other": {
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 89
},
{
"name": {
"Rfc": "subject"
},
"start": 97,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 317
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 343,
"end": 350
},
{
"name": {
"Other": "X-Priority"
},
"start": 361,
"end": 374
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 392,
"end": 401
},
{
"name": {
"Other": "X-Mailer"
},
"start": 410,
"end": 463
},
{
"name": {
"Other": "Importance"
},
"start": 474,
"end": 483
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 493,
"end": 541
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "8bit"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+66 -159
View File
@@ -187,30 +187,32 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
------=_NextPart_000_0010_01BFC038.B91BC650-- ------=_NextPart_000_0010_01BFC038.B91BC650--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"from": { "content_type": {
"Address": { "ContentType": {
"name": "Doug Sauder", "c_type": "multipart",
"address": "doug@example.com" "c_subtype": "mixed",
"attributes": {
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
}
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com"
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com"
},
"to": { "to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Joe Blow",
"address": "jblow@example.com" "address": "jblow@example.com"
} }
}, },
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -224,119 +226,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": { "from": {
"ContentType": { "Address": {
"c_type": "multipart", "name": "Doug Sauder",
"c_subtype": "mixed", "address": "doug@example.com"
"attributes": {
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
}
} }
} }
}, },
"headers_other": {
"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-Priority": {
"Text": "3 (Normal)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 331
},
{
"name": {
"Other": "X-Priority"
},
"start": 342,
"end": 355
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 373,
"end": 382
},
{
"name": {
"Other": "X-Mailer"
},
"start": 391,
"end": 444
},
{
"name": {
"Other": "Importance"
},
"start": 455,
"end": 464
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 474,
"end": 522
}
],
"html_body": [ "html_body": [
3 3
], ],
@@ -351,12 +247,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "related", "c_type": "multipart",
"attributes": { "c_subtype": "related",
"boundary": "----=_NextPart_001_0011_01BFC038.B91BC650" "attributes": {
"boundary": "----=_NextPart_001_0011_01BFC038.B91BC650"
}
} }
} }
} }
@@ -364,12 +262,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "----=_NextPart_002_0012_01BFC038.B91BC650" "attributes": {
"boundary": "----=_NextPart_002_0012_01BFC038.B91BC650"
}
} }
} }
} }
@@ -377,10 +277,7 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -389,14 +286,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
@@ -410,18 +311,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"is_encoding_problem": false,
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:938014623@17052000-0f9b\"></FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>&nbsp;</DIV></FONT></BODY></HTML>\n" "body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:938014623@17052000-0f9b\"></FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp; <BR>&nbsp;<BR>Slow but steady wins the race.&nbsp; \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR>&nbsp;</DIV></FONT></BODY></HTML>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "938014623@17052000-0f9b"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -430,8 +326,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_id": {
"Text": "938014623@17052000-0f9b"
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1763,7 +1666,19 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1772,19 +1687,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -3089,7 +2994,7 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3105,12 +3010,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "redball.png" "filename": "redball.png"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+27 -134
View File
@@ -29,33 +29,20 @@ IHdlbGNoZSBhbHNvIHdvaGwgbm9jaCB1bmds/GNrbGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIu
IiANCg== IiANCg==
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"to": { "to": {
"Address": { "Address": {
"name": "J�rgen Schm�rgen", "name": "J�rgen Schm�rgen",
"address": "schmuergen@example.com" "address": "schmuergen@example.com"
} }
}, },
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
},
"content_transfer_encoding": {
"Text": "base64"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -69,135 +56,41 @@ IiANCg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": { "message_id": {
"ContentType": { "Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
"c_type": "text", },
"c_subtype": "plain", "from": {
"attributes": { "Address": {
"charset": "iso-8859-1" "name": "Doug Sauder",
} "address": "doug@example.com"
} }
} }
}, },
"headers_other": {
"X-Priority": {
"Text": "3 (Normal)"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 89
},
{
"name": {
"Rfc": "subject"
},
"start": 97,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 317
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 343,
"end": 352
},
{
"name": {
"Other": "X-Priority"
},
"start": 363,
"end": 376
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 394,
"end": 403
},
{
"name": {
"Other": "X-Mailer"
},
"start": 412,
"end": 465
},
{
"name": {
"Other": "Importance"
},
"start": 476,
"end": 485
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 495,
"end": 543
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+56 -123
View File
@@ -107,37 +107,11 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
--=====================_716541962==_-- --=====================_716541962==_--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "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": 56,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -152,81 +126,33 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
}, },
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com" "Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com"
},
"date": {
"DateTime": {
"year": 2000,
"month": 5,
"day": 19,
"hour": 0,
"minute": 56,
"second": 13,
"tz_before_gmt": true,
"tz_hour": 4,
"tz_minute": 0
}
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "jschmuergen@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 295
},
{
"name": {
"Rfc": "from"
},
"start": 300,
"end": 337
},
{
"name": {
"Rfc": "subject"
},
"start": 345,
"end": 390
},
{
"name": {
"Rfc": "mime_version"
},
"start": 403,
"end": 409
},
{
"name": {
"Rfc": "content_type"
},
"start": 422,
"end": 489
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -241,7 +167,7 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
@@ -255,12 +181,25 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
} }
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -269,19 +208,9 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1613,10 +1542,11 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "farmerandstork.txt" "filename": "farmerandstork.txt"
} }
@@ -1632,15 +1562,25 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
} }
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "HasenundFr�sche.txt"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -1649,16 +1589,9 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "HasenundFr�sche.txt"
}
}
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+43 -122
View File
@@ -108,14 +108,13 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
--=====================_715429112==_.REL-- --=====================_715429112==_.REL--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": { "message_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com" "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com"
}, },
"mime_version": { "subject": {
"Text": "1.0" "Text": "Die Hasen und die Frösche"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -127,18 +126,6 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -152,93 +139,22 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": { "to": {
"Text": "Die Hasen und die Frösche" "Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_other": {
"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"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 508
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -252,7 +168,10 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -261,26 +180,19 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<html>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2\" width=27 height=27 alt=\"2aa48eb6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3\" width=27 height=27 alt=\"2aa48ec0.png\"></font></html>\n" "body": "<html>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2\" width=27 height=27 alt=\"2aa48eb6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3\" width=27 height=27 alt=\"2aa48ec0.png\"></font></html>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "2aa48eb6.png" "filename": "2aa48eb6.png"
} }
@@ -294,8 +206,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "2aa48eb6.png" "name": "2aa48eb6.png"
} }
} }
},
"content_id": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2"
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1627,20 +1546,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_id": {
"ContentType": { "Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3"
"c_type": "inline",
"attributes": {
"filename": "2aa48ec0.png"
}
}
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_id": { "content_disposition": {
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3" "ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa48ec0.png"
}
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -1652,6 +1572,7 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+64 -137
View File
@@ -170,21 +170,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
--=====================_715462801==_-- --=====================_715462801==_--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -194,14 +181,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"subject": { "message_id": {
"Text": "Die Hasen und die Frösche" "Text": "4.2.0.58.20000519003809.00a85140@pop.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -215,91 +196,26 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
} }
}, },
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
},
"X-Priority": {
"Text": "2 (High)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 482
}
],
"html_body": [ "html_body": [
1 1
], ],
@@ -315,13 +231,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "related", "c_type": "multipart",
"attributes": { "c_subtype": "related",
"type": "text/html", "attributes": {
"boundary": "=====================_715462801==_.REL" "type": "text/html",
"boundary": "=====================_715462801==_.REL"
}
} }
} }
} }
@@ -329,7 +247,7 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -343,12 +261,19 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.2\" width=27 height=27 alt=\"2aa51367.png\"><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.3\" width=27 height=27 alt=\"2aa51371.png\"></html>\n" "body": "<html>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n</font><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.2\" width=27 height=27 alt=\"2aa51367.png\"><img src=\"cid:4.2.0.58.20000519003809.00a85140@pop.example.com.3\" width=27 height=27 alt=\"2aa51371.png\"></html>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -358,21 +283,17 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "2aa51367.png" "filename": "2aa51367.png"
} }
} }
},
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1704,7 +1625,7 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1714,21 +1635,23 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3"
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "2aa51371.png" "filename": "2aa51371.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -3188,7 +3111,16 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3200,16 +3132,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -4541,10 +4466,11 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "greenball.png" "filename": "greenball.png"
} }
@@ -4563,6 +4489,7 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"Text": "base64" "Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+29 -98
View File
@@ -83,8 +83,7 @@ Birds of a feather flock together.
--=====================_716740438==_-- --=====================_716740438==_--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -95,15 +94,12 @@ Birds of a feather flock together.
} }
} }
}, },
"to": { "from": {
"Address": { "Address": {
"name": "Heinz Müller", "name": "Doug Sauder",
"address": "mueller@example.com" "address": "dwsauder@example.com"
} }
}, },
"message_id": {
"Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -117,92 +113,22 @@ Birds of a feather flock together.
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": { "to": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Heinz Müller",
"address": "dwsauder@example.com" "address": "mueller@example.com"
} }
}, },
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
}, },
"message_id": {
"Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
} }
}, },
"headers_other": {
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Rfc": "date"
},
"start": 175,
"end": 209
},
{
"name": {
"Rfc": "to"
},
"start": 212,
"end": 266
},
{
"name": {
"Rfc": "from"
},
"start": 271,
"end": 308
},
{
"name": {
"Rfc": "subject"
},
"start": 316,
"end": 361
},
{
"name": {
"Rfc": "mime_version"
},
"start": 374,
"end": 380
},
{
"name": {
"Rfc": "content_type"
},
"start": 393,
"end": 460
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -216,7 +142,7 @@ Birds of a feather flock together.
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -230,15 +156,13 @@ Birds of a feather flock together.
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -253,18 +177,32 @@ Birds of a feather flock together.
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "HasenundFr�sche.txt" "filename": "HasenundFr�sche.txt"
} }
} }
},
"content_transfer_encoding": {
"Text": "x-uuencode"
} }
}, },
"is_encoding_problem": false,
"body": "\r\nbegin 600 HasenundFr�sche.txt\r\nM1&EE($AA<V5N('5N9\"!D:64@1G+V<V-H90T*#0I$:64@2&%S96X@:VQA9W1E\r\nM;B!E:6YS=\"#\\8F5R(&EH<F4@;6G?;&EC:&4@3&%G93L@(G=I<B!L96)E;B(L\r\nM('-P<F%C:\"!E:6X@4F5D;F5R+\"`B:6X@<W1E=&5R($9U<F-H=\"!V;W(@365N\r\nM<V-H96X@=6YD(%1I97)E;BP@96EN92!\"975T92!D97(@2'5N9&4L(&1E<B!!\r\nM9&QE<BP@:F$@9F%S=\"!A;&QE<B!2875B=&EE<F4A(%5N<V5R92!S=&5T92!!\r\nM;F=S=\"!I<W0@Y')G97(@86QS(&1E<B!4;V0@<V5L8G-T+B!!=68L(&QAWW0@\r\nM=6YS(&5I;B!F_'(@86QL96UA;\"!S=&5R8F5N+B(@#0H-\"DEN(&5I;F5M(&YA\r\nM:&5N(%1E:6-H('=O;&QT96X@<VEE('-I8V@@;G5N(&5R<^1U9F5N.R!S:64@\r\nM96EL=&5N(&EH;2!Z=3L@86QL96EN(&1A<R!A==]E<F]R9&5N=&QI8VAE($=E\r\nM=/9S92!U;F0@:6AR92!W=6YD97)B87)E($=E<W1A;'0@97)S8VAR96-K=&4@\r\nM96EN92!-96YG92!&<O9S8VAE+\"!D:64@86T@569E<B!S8=]E;BP@<V\\@<V5H\r\nM<BP@9&'?('-I92!A=69S('-C:&YE;&QS=&4@=6YT97)T875C:'1E;BX@#0H-\r\nM\"B)(86QT(BP@<FEE9B!N=6X@96)E;B!D:65S97(@4W!R96-H97(L(\")W:7(@\r\nM=V]L;&5N(&1A<R!%<G/D=69E;B!N;V-H(&5I;B!W96YI9R!A=69S8VAI96)E\r\nM;BP@9&5N;B!A=6-H('5N<R!F_')C:'1E;BP@=VEE(&EH<B!S96AT+\"!E:6YI\r\nM9V4@5&EE<F4L('=E;&-H92!A;'-O('=O:&P@;F]C:\"!U;F=L_&-K;&EC:&5R\r\n;('-E:6X@;?QS<V5N(&%L<R!W:7(N(B`-\"@T*\r\n`\r\nend\r\n\r" "body": "\r\nbegin 600 HasenundFr�sche.txt\r\nM1&EE($AA<V5N('5N9\"!D:64@1G+V<V-H90T*#0I$:64@2&%S96X@:VQA9W1E\r\nM;B!E:6YS=\"#\\8F5R(&EH<F4@;6G?;&EC:&4@3&%G93L@(G=I<B!L96)E;B(L\r\nM('-P<F%C:\"!E:6X@4F5D;F5R+\"`B:6X@<W1E=&5R($9U<F-H=\"!V;W(@365N\r\nM<V-H96X@=6YD(%1I97)E;BP@96EN92!\"975T92!D97(@2'5N9&4L(&1E<B!!\r\nM9&QE<BP@:F$@9F%S=\"!A;&QE<B!2875B=&EE<F4A(%5N<V5R92!S=&5T92!!\r\nM;F=S=\"!I<W0@Y')G97(@86QS(&1E<B!4;V0@<V5L8G-T+B!!=68L(&QAWW0@\r\nM=6YS(&5I;B!F_'(@86QL96UA;\"!S=&5R8F5N+B(@#0H-\"DEN(&5I;F5M(&YA\r\nM:&5N(%1E:6-H('=O;&QT96X@<VEE('-I8V@@;G5N(&5R<^1U9F5N.R!S:64@\r\nM96EL=&5N(&EH;2!Z=3L@86QL96EN(&1A<R!A==]E<F]R9&5N=&QI8VAE($=E\r\nM=/9S92!U;F0@:6AR92!W=6YD97)B87)E($=E<W1A;'0@97)S8VAR96-K=&4@\r\nM96EN92!-96YG92!&<O9S8VAE+\"!D:64@86T@569E<B!S8=]E;BP@<V\\@<V5H\r\nM<BP@9&'?('-I92!A=69S('-C:&YE;&QS=&4@=6YT97)T875C:'1E;BX@#0H-\r\nM\"B)(86QT(BP@<FEE9B!N=6X@96)E;B!D:65S97(@4W!R96-H97(L(\")W:7(@\r\nM=V]L;&5N(&1A<R!%<G/D=69E;B!N;V-H(&5I;B!W96YI9R!A=69S8VAI96)E\r\nM;BP@9&5N;B!A=6-H('5N<R!F_')C:'1E;BP@=VEE(&EH<B!S96AT+\"!E:6YI\r\nM9V4@5&EE<F4L('=E;&-H92!A;'-O('=O:&P@;F]C:\"!U;F=L_&-K;&EC:&5R\r\n;('-E:6X@;?QS<V5N(&%L<R!W:7(N(B`-\"@T*\r\n`\r\nend\r\n\r"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "farmerandstork.txt"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -273,16 +211,9 @@ Birds of a feather flock together.
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "farmerandstork.txt"
}
}
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
} }
+20 -127
View File
@@ -30,24 +30,17 @@ ein wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige =
Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20 Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"to": { "to": {
"Address": { "Address": {
"name": "J�rgen Schm�rgen", "name": "J�rgen Schm�rgen",
@@ -72,133 +65,33 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
} }
}, },
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"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"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 89
},
{
"name": {
"Rfc": "subject"
},
"start": 97,
"end": 148
},
{
"name": {
"Rfc": "date"
},
"start": 153,
"end": 187
},
{
"name": {
"Rfc": "message_id"
},
"start": 198,
"end": 248
},
{
"name": {
"Rfc": "mime_version"
},
"start": 261,
"end": 267
},
{
"name": {
"Rfc": "content_type"
},
"start": 280,
"end": 317
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 343,
"end": 362
},
{
"name": {
"Other": "X-Priority"
},
"start": 373,
"end": 386
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 404,
"end": 413
},
{
"name": {
"Other": "X-Mailer"
},
"start": 422,
"end": 475
},
{
"name": {
"Other": "Importance"
},
"start": 486,
"end": 495
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 505,
"end": 553
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+44 -142
View File
@@ -155,9 +155,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
------=_NextPart_000_000C_01BFC038.5A5C8E60-- ------=_NextPart_000_000C_01BFC038.5A5C8E60--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -171,6 +176,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com"
}, },
@@ -182,129 +199,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60" "boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
} }
} }
},
"subject": {
"Text": "Test message from Microsoft Outlook 00"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "jblow@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@example.com"
}
} }
}, },
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-MSMail-Priority": {
"Text": "Normal"
},
"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"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 76
},
{
"name": {
"Rfc": "subject"
},
"start": 84,
"end": 125
},
{
"name": {
"Rfc": "date"
},
"start": 130,
"end": 164
},
{
"name": {
"Rfc": "message_id"
},
"start": 175,
"end": 225
},
{
"name": {
"Rfc": "mime_version"
},
"start": 238,
"end": 244
},
{
"name": {
"Rfc": "content_type"
},
"start": 257,
"end": 333
},
{
"name": {
"Other": "X-Priority"
},
"start": 344,
"end": 357
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 375,
"end": 384
},
{
"name": {
"Other": "X-Mailer"
},
"start": 393,
"end": 446
},
{
"name": {
"Other": "Importance"
},
"start": 457,
"end": 466
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 476,
"end": 524
}
],
"html_body": [ "html_body": [
2 2
], ],
@@ -318,12 +214,14 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "----=_NextPart_001_000D_01BFC038.5A5C8E60" "attributes": {
"boundary": "----=_NextPart_001_000D_01BFC038.5A5C8E60"
}
} }
} }
} }
@@ -331,7 +229,10 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -340,17 +241,15 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -364,18 +263,16 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp;&nbsp;</FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR>&nbsp;<BR>Slow but steady wins \nthe race.&nbsp; </FONT></DIV>\n<DIV>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"red ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f94\"><BR></DIV></FONT></BODY></HTML>\n" "body": "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 4.0 Transitional//EN\">\n<HTML><HEAD>\n<META content=\"text/html; charset=iso-8859-1\" http-equiv=Content-Type>\n<META content=\"MSHTML 5.00.2314.1000\" name=GENERATOR></HEAD>\n<BODY>\n<DIV><FONT face=Arial size=2><BR>The Hare and the Tortoise <BR>&nbsp;<BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing:&nbsp; \"Though you be swift as the wind, I will beat you in a \nrace.\"&nbsp; 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.&nbsp; On the day appointed for the race the two started \ntogether.&nbsp; The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course.&nbsp; The Hare, lying down by \nthe wayside, fell fast asleep.&nbsp; 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.&nbsp;&nbsp;</FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR>&nbsp;<BR>Slow but steady wins \nthe race.&nbsp; </FONT></DIV>\n<DIV>&nbsp;</DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"red ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f94\"><BR></DIV></FONT></BODY></HTML>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": { "content_id": {
"Text": "823504223@17052000-0f8d" "Text": "823504223@17052000-0f8d"
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -384,8 +281,12 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1717,7 +1618,10 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "823504223@17052000-0f94"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1729,11 +1633,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_id": {
"Text": "823504223@17052000-0f94"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+25 -112
View File
@@ -26,18 +26,20 @@ reached the goal, and was comfortably dozing after her fatigue.
Slow but steady wins the race. Slow but steady wins the race.
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -51,130 +53,41 @@ Slow but steady wins the race.
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_transfer_encoding": {
"Text": "7bit"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": { "subject": {
"Address": { "Text": "Test message from Netscape Communicator 4.7"
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}, },
"message_id": { "message_id": {
"Text": "392362D8.B650789F@example.com" "Text": "392362D8.B650789F@example.com"
} }
}, },
"headers_other": {
"X-Priority": {
"Text": "1 (Highest)"
},
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Other": "X-Priority"
},
"start": 305,
"end": 319
},
{
"name": {
"Rfc": "content_type"
},
"start": 332,
"end": 363
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 389,
"end": 396
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
}
},
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
} }
+50 -117
View File
@@ -110,17 +110,13 @@ Slow but steady wins the race.
--------------0BBC657DDC74A0B8454627FD-- --------------0BBC657DDC74A0B8454627FD--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"from": { "subject": {
"Address": { "Text": "Test message from Netscape Communicator 4.7"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"message_id": { "mime_version": {
"Text": "3923635B.85C58444@example.com" "Text": "1.0"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -131,18 +127,12 @@ Slow but steady wins the race.
} }
} }
}, },
"to": { "from": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Doug Sauder",
"address": "blow@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -155,81 +145,17 @@ Slow but steady wins the race.
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "3923635B.85C58444@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
} }
}, },
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [ "html_body": [
0, 0,
1, 1,
@@ -248,7 +174,7 @@ Slow but steady wins the race.
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "7bit" "Text": "7bit"
}, },
@@ -262,20 +188,13 @@ Slow but steady wins the race.
} }
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -287,8 +206,18 @@ Slow but steady wins the race.
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1620,7 +1549,19 @@ Slow but steady wins the race.
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1629,19 +1570,9 @@ Slow but steady wins the race.
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -2946,10 +2877,7 @@ Slow but steady wins the race.
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -2960,15 +2888,20 @@ Slow but steady wins the race.
} }
} }
}, },
"content_transfer_encoding": {
"Text": "7bit"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "hareandtoroise.txt" "filename": "hareandtoroise.txt"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
} }
+38 -85
View File
@@ -95,8 +95,7 @@ mWkOvwAAACV0RVh0Q29tbWVudABjbGlwMmdpZiB2LjAuNiBieSBZdmVzIFBp
Z3VldDZzO7wAAAAASUVORK5CYII= Z3VldDZzO7wAAAAASUVORK5CYII=
---1463757054-952513540-958744548=:8452-- ---1463757054-952513540-958744548=:8452--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"from": { "from": {
"Address": { "Address": {
@@ -104,15 +103,12 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
"address": "doug@penguin.example.com" "address": "doug@penguin.example.com"
} }
}, },
"subject": {
"Text": "Test message from PINE"
},
"message_id": {
"Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"subject": {
"Text": "Test message from PINE"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -135,6 +131,9 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com"
},
"to": { "to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Joe Blow",
@@ -142,57 +141,6 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 124
},
{
"name": {
"Rfc": "subject"
},
"start": 132,
"end": 157
},
{
"name": {
"Rfc": "message_id"
},
"start": 168,
"end": 232
},
{
"name": {
"Rfc": "mime_version"
},
"start": 245,
"end": 251
},
{
"name": {
"Rfc": "content_type"
},
"start": 264,
"end": 332
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -206,7 +154,7 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -217,12 +165,19 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"is_encoding_problem": false,
"body": "This is a test message from PINE MUA.\r\n\r\n\r" "body": "This is a test message from PINE MUA.\r\n\r\n\r"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_description": {
"Text": "A PNG graphic file"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
@@ -232,24 +187,20 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": {
"Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "redball.png" "filename": "redball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_id": {
"Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com"
},
"content_description": {
"Text": "A PNG graphic file"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1709,7 +1660,22 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
@@ -1719,24 +1685,11 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": {
"Text": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com"
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_description": { "content_description": {
"Text": "A PNG graphic file" "Text": "A PNG graphic file"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+51 -117
View File
@@ -132,9 +132,17 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
--------------C78F594988075E36AE03C243-- --------------C78F594988075E36AE03C243--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -144,6 +152,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -157,101 +168,16 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "39235EAD.E48E2160@example.com"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "39235EAD.E48E2160@example.com"
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [ "html_body": [
2, 2,
3, 3,
@@ -269,12 +195,14 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "------------D74AE2393FB01D1B284AE257" "attributes": {
"boundary": "------------D74AE2393FB01D1B284AE257"
}
} }
} }
} }
@@ -282,10 +210,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -294,17 +219,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -313,17 +239,22 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "greenball.png" "filename": "greenball.png"
} }
@@ -342,6 +273,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"Text": "base64" "Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1646,18 +1578,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1666,8 +1587,21 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+29 -116
View File
@@ -32,19 +32,15 @@ n
wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere, wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere,
welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": { "mime_version": {
"Text": "392363E1.2AC47AB3@example.com" "Text": "1.0"
}, },
"content_type": { "from": {
"ContentType": { "Address": {
"c_type": "text", "name": "Doug Sauder",
"c_subtype": "plain", "address": "dwsauder@example.com"
"attributes": {
"charset": "UTF-8"
}
} }
}, },
"to": { "to": {
@@ -53,6 +49,12 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"address": "blow@example.com" "address": "blow@example.com"
} }
}, },
"message_id": {
"Text": "392363E1.2AC47AB3@example.com"
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -65,122 +67,33 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"mime_version": {
"Text": "1.0"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Priority": {
"Text": "5 (Lowest)"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Other": "X-Priority"
},
"start": 305,
"end": 318
},
{
"name": {
"Rfc": "content_type"
},
"start": 331,
"end": 359
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 385,
"end": 404
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+31 -108
View File
@@ -25,9 +25,20 @@ schnellste untertauchten.
wenig aufschieben, denn auch uns f+vGM-hten, wie ihr seht, einige Tiere, wenig aufschieben, denn auch uns f+vGM-hten, wie ihr seht, einige Tiere,
welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir." welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "39236497.12FA2A89@example.com"
},
"subject": {
"Text": "Die Hasen und die Fr+APY-sche"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -41,129 +52,41 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-7"
}
}
}, },
"to": { "to": {
"Address": { "Address": {
"name": "Heinz M+APw-ller", "name": "Heinz M+APw-ller",
"address": "mueller@example.com" "address": "mueller@example.com"
} }
},
"mime_version": {
"Text": "1.0"
},
"subject": {
"Text": "Die Hasen und die Fr+APY-sche"
},
"content_transfer_encoding": {
"Text": "7bit"
},
"message_id": {
"Text": "39236497.12FA2A89@example.com"
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 253
},
{
"name": {
"Rfc": "subject"
},
"start": 261,
"end": 293
},
{
"name": {
"Rfc": "content_type"
},
"start": 306,
"end": 334
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 360,
"end": 367
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-7"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+71 -129
View File
@@ -211,27 +211,14 @@ YII=
--------------A1E83A41894D3755390B838A-- --------------A1E83A41894D3755390B838A--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------A1E83A41894D3755390B838A"
}
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -245,6 +232,15 @@ YII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------A1E83A41894D3755390B838A"
}
}
},
"to": { "to": {
"Address": { "Address": {
"name": "Heinz Müller", "name": "Heinz Müller",
@@ -254,83 +250,13 @@ YII=
"message_id": { "message_id": {
"Text": "39235FC5.276CCE00@example.com" "Text": "39235FC5.276CCE00@example.com"
}, },
"subject": { "from": {
"Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)" "Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
} }
}, },
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 266
},
{
"name": {
"Rfc": "subject"
},
"start": 274,
"end": 346
},
{
"name": {
"Rfc": "content_type"
},
"start": 359,
"end": 428
}
],
"html_body": [ "html_body": [
3, 3,
6, 6,
@@ -350,12 +276,14 @@ YII=
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "------------F03F94BA73D3B9E8C1B94D92" "attributes": {
"boundary": "------------F03F94BA73D3B9E8C1B94D92"
}
} }
} }
} }
@@ -363,7 +291,7 @@ YII=
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -377,17 +305,20 @@ YII=
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "[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" "body": "[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"
} }
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "related", "c_type": "multipart",
"attributes": { "c_subtype": "related",
"boundary": "------------C02FA3D0A04E95F295FB25EB" "attributes": {
"boundary": "------------C02FA3D0A04E95F295FB25EB"
}
} }
} }
} }
@@ -395,7 +326,10 @@ YII=
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -404,38 +338,39 @@ YII=
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39235FC5.E71D8178@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39235FC5.E71D8178@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39235FC5.E71D8178@example.com\" height=27 width=27>\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "part1.39235FC5.E71D8178@example.com"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
"c_subtype": "png" "c_subtype": "png",
"attributes": null
} }
}, },
"content_transfer_encoding": { "content_id": {
"Text": "base64" "Text": "part1.39235FC5.E71D8178@example.com"
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "C:TEMPnsmailEG.png" "filename": "C:TEMPnsmailEG.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1767,28 +1702,31 @@ YII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_id": {
"ContentType": { "Text": "part2.39235FC5.E71D8178@example.com"
"c_type": "image",
"c_subtype": "png"
}
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "C:TEMPnsmail39.png" "filename": "C:TEMPnsmail39.png"
} }
} }
}, },
"content_id": { "content_type": {
"Text": "part2.39235FC5.E71D8178@example.com" "ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": null
}
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -3248,7 +3186,7 @@ YII=
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -3264,12 +3202,14 @@ YII=
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "redball.png" "filename": "redball.png"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -4729,10 +4669,14 @@ YII=
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "greenball.png" "filename": "greenball.png"
} }
@@ -4746,11 +4690,9 @@ YII=
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+27 -82
View File
@@ -25,11 +25,16 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": { "mime_version": {
"Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com" "Text": "1.0"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -44,29 +49,11 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_transfer_encoding": {
"Text": "QUOTED-PRINTABLE"
},
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
}, },
"content_type": { "message_id": {
"ContentType": { "Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com"
"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": { "from": {
"Address": { "Address": {
@@ -75,73 +62,31 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 159
},
{
"name": {
"Rfc": "subject"
},
"start": 167,
"end": 214
},
{
"name": {
"Rfc": "message_id"
},
"start": 225,
"end": 289
},
{
"name": {
"Rfc": "mime_version"
},
"start": 302,
"end": 308
},
{
"name": {
"Rfc": "content_type"
},
"start": 321,
"end": 354
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 380,
"end": 399
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "QUOTED-PRINTABLE"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+40 -111
View File
@@ -50,32 +50,13 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
--------------E7889DDF0F75D34163841C59-- --------------E7889DDF0F75D34163841C59--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"from": { "mime_version": {
"Address": { "Text": "1.0"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"to": { "message_id": {
"Address": { "Text": "392366A7.21929EA7@example.com"
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------E7889DDF0F75D34163841C59"
}
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -90,86 +71,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": { "from": {
"Text": "1.0" "Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"message_id": { "subject": {
"Text": "392366A7.21929EA7@example.com" "Text": "Test message from Netscape Communicator 4.7"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------E7889DDF0F75D34163841C59"
}
}
} }
}, },
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [ "html_body": [
0, 0,
1 1
@@ -184,7 +110,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "7bit" "Text": "7bit"
}, },
@@ -198,23 +124,16 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"is_encoding_problem": false,
"body": " \r" "body": " \r"
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -223,8 +142,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+26 -103
View File
@@ -16,14 +16,13 @@ A HARE one day ridiculed the short feet and slow pace of the Tortoise, who repli
Slow but steady wins the race. Slow but steady wins the race.
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": { "message_id": {
"Text": "3923625B.59F0C3AC@example.com" "Text": "3923625B.59F0C3AC@example.com"
}, },
"content_transfer_encoding": { "subject": {
"Text": "7bit" "Text": "Test message from Netscape Communicator 4.7"
}, },
"to": { "to": {
"Address": { "Address": {
@@ -31,18 +30,6 @@ Slow but steady wins the race.
"address": "blow@example.com" "address": "blow@example.com"
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -56,105 +43,41 @@ Slow but steady wins the race.
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": { "from": {
"ContentType": { "Address": {
"c_type": "text", "name": "Doug Sauder",
"c_subtype": "plain", "address": "dwsauder@example.com"
"attributes": {
"charset": "us-ascii"
}
} }
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 338
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 364,
"end": 371
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "us-ascii"
}
}
},
"content_transfer_encoding": {
"Text": "7bit"
}
},
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
} }
+71 -132
View File
@@ -170,9 +170,17 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
--------------B7133A01A6B323BF00DBC9A7-- --------------B7133A01A6B323BF00DBC9A7--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
@@ -188,21 +196,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"message_id": { "message_id": {
"Text": "39236103.FFE674FC@example.com" "Text": "39236103.FFE674FC@example.com"
}, },
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -215,81 +211,11 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 277
},
{
"name": {
"Rfc": "subject"
},
"start": 285,
"end": 331
},
{
"name": {
"Rfc": "content_type"
},
"start": 344,
"end": 413
}
],
"html_body": [ "html_body": [
1, 1,
4, 4,
@@ -309,12 +235,14 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "related", "c_type": "multipart",
"attributes": { "c_subtype": "related",
"boundary": "------------8E6A06810565BCAB5E1F7D97" "attributes": {
"boundary": "------------8E6A06810565BCAB5E1F7D97"
}
} }
} }
} }
@@ -322,10 +250,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -334,35 +259,42 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39236103.1B697A54@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b><font size=+2>Die Hasen und die Fr&ouml;sche</font></b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<img SRC=\"cid:part1.39236103.1B697A54@example.com\" ALT=\"blue ball\" height=27 width=27><b></b>\r\n<p><b><font size=+2>Die Hasen und die Fr&ouml;sche</font></b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n\r"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "part1.39236103.1B697A54@example.com"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": null
}
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "C:TEMPnsmailV0.png" "filename": "C:TEMPnsmailV0.png"
} }
} }
}, },
"content_id": {
"Text": "part1.39236103.1B697A54@example.com"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png"
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1694,28 +1626,31 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "image",
"c_subtype": "png",
"attributes": null
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "C:TEMPnsmailNM.png"
}
}
},
"content_id": { "content_id": {
"Text": "part2.39236103.1B697A54@example.com" "Text": "part2.39236103.1B697A54@example.com"
}, },
"content_type": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "inline",
"c_subtype": "png" "c_subtype": null,
"attributes": {
"filename": "C:TEMPnsmailNM.png"
}
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -3175,10 +3110,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3188,15 +3120,20 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "greenball.png" "filename": "greenball.png"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -4501,15 +4438,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -4521,8 +4450,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+26 -103
View File
@@ -27,18 +27,8 @@ schnellste untertauchten. =
n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere= n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir." , welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -48,18 +38,6 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"message_id": {
"Text": "39236653.CAA8A090@example.com"
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -73,99 +51,44 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"message_id": {
"Text": "39236653.CAA8A090@example.com"
},
"to": {
"Address": {
"name": "Jürgen Schmürgen",
"address": "schmuergen@example.com"
}
},
"subject": { "subject": {
"Text": "Die Hasen und die Frösche" "Text": "Die Hasen und die Frösche"
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 277
},
{
"name": {
"Rfc": "subject"
},
"start": 285,
"end": 332
},
{
"name": {
"Rfc": "content_type"
},
"start": 345,
"end": 378
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 404,
"end": 423
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+42 -91
View File
@@ -56,39 +56,8 @@ JXRFWHRDb21tZW50AGNsaXAyZ2lmIHYuMC42IGJ5IFl2ZXMgUGlndWV0NnM7
vAAAAABJRU5ErkJggg== vAAAAABJRU5ErkJggg==
---1463757054-170444605-958746196=:8452-- ---1463757054-170444605-958746196=:8452--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-170444605-958746196=:8452"
}
}
},
"subject": {
"Text": "PNG graphic"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"message_id": {
"Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com"
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -101,59 +70,38 @@ vAAAAABJRU5ErkJggg==
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-170444605-958746196=:8452"
}
}
},
"subject": {
"Text": "PNG graphic"
},
"message_id": {
"Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 150
},
{
"name": {
"Rfc": "subject"
},
"start": 158,
"end": 172
},
{
"name": {
"Rfc": "message_id"
},
"start": 183,
"end": 247
},
{
"name": {
"Rfc": "mime_version"
},
"start": 260,
"end": 266
},
{
"name": {
"Rfc": "content_type"
},
"start": 279,
"end": 347
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -166,7 +114,7 @@ vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -177,21 +125,19 @@ vAAAAABJRU5ErkJggg==
} }
} }
}, },
"is_encoding_problem": false,
"body": "\r" "body": "\r"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_id": {
"Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com"
},
"content_description": {
"Text": "red ball"
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "BASE64" "Text": "BASE64"
}, },
"content_id": {
"Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
@@ -204,12 +150,17 @@ vAAAAABJRU5ErkJggg==
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "redball.png" "filename": "redball.png"
} }
} }
},
"content_description": {
"Text": "red ball"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+40 -111
View File
@@ -57,9 +57,20 @@ Birds of a feather flock together.
--------------77060D866A66DC8D0921E051-- --------------77060D866A66DC8D0921E051--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------77060D866A66DC8D0921E051"
}
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -73,110 +84,25 @@ Birds of a feather flock together.
"tz_minute": 0 "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"
}
}
},
"message_id": {
"Text": "3923686C.99FB5E36@example.com"
},
"from": { "from": {
"Address": { "Address": {
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": { "mime_version": {
"Text": "Test message from Netscape Communicator 4.7" "Text": "1.0"
},
"message_id": {
"Text": "3923686C.99FB5E36@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -189,10 +115,7 @@ Birds of a feather flock together.
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -201,22 +124,18 @@ Birds of a feather flock together.
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "farmerandstork.txt"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "7bit" "Text": "7bit"
}, },
@@ -229,8 +148,18 @@ Birds of a feather flock together.
"name": "farmerandstork.txt" "name": "farmerandstork.txt"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "farmerandstork.txt"
}
}
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
} }
+33 -104
View File
@@ -60,11 +60,19 @@ als wir."
--------------9D454F23DA86BCD63FA3805F-- --------------9D454F23DA86BCD63FA3805F--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": { "from": {
"Text": "392359CF.DFF4527@example.com" "Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
},
"mime_version": {
"Text": "1.0"
}, },
"to": { "to": {
"Address": { "Address": {
@@ -72,8 +80,14 @@ als wir."
"address": "mueller@example.com" "address": "mueller@example.com"
} }
}, },
"subject": { "content_type": {
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)" "ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "------------9D454F23DA86BCD63FA3805F"
}
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -88,108 +102,24 @@ als wir."
"tz_minute": 0 "tz_minute": 0
} }
}, },
"mime_version": { "message_id": {
"Text": "1.0" "Text": "392359CF.DFF4527@example.com"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "------------9D454F23DA86BCD63FA3805F"
}
}
} }
}, },
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 44
},
{
"name": {
"Rfc": "date"
},
"start": 49,
"end": 83
},
{
"name": {
"Rfc": "from"
},
"start": 88,
"end": 125
},
{
"name": {
"Other": "X-Mailer"
},
"start": 134,
"end": 164
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 182,
"end": 187
},
{
"name": {
"Rfc": "mime_version"
},
"start": 200,
"end": 206
},
{
"name": {
"Rfc": "to"
},
"start": 209,
"end": 265
},
{
"name": {
"Rfc": "subject"
},
"start": 273,
"end": 348
},
{
"name": {
"Rfc": "content_type"
},
"start": 361,
"end": 436
}
],
"html_body": [ "html_body": [
1 1
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -198,17 +128,18 @@ als wir."
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -217,11 +148,9 @@ als wir."
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r" "body": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Fr&ouml;sche</b>\r\n<p>Die Hasen klagten einst &uuml;ber ihre mi&szlig;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 &auml;rger\r\nals der Tod selbst. Auf, la&szlig;t uns ein f&uuml;r allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ers&auml;ufen; sie eilten\r\nihm zu; allein das au&szlig;erordentliche Get&ouml;se und ihre wunderbare\r\nGestalt erschreckte eine Menge Fr&ouml;sche, die am Ufer sa&szlig;en, so\r\nsehr, da&szlig; sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ers&auml;ufen\r\nnoch ein wenig aufschieben, denn auch uns f&uuml;rchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch ungl&uuml;cklicher sein m&uuml;ssen\r\nals wir.\"\r\n<br>&nbsp;\r\n<br>&nbsp;</html>\r\n\r"
} }
} }
+46 -113
View File
@@ -136,19 +136,12 @@ xW62p+lT+Yi747sD/wEUVMzYmWkOvwAAACV0RVh0Q29tbWVudABjbGlwMmdpZiB2LjAuNiBi
eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII= eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
--------------A1FCDEE154E03D875E5D6779-- --------------A1FCDEE154E03D875E5D6779--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": { "from": {
"Text": "39235E1C.1DC7EA90@example.com"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": { "Address": {
"name": "Joe Blow", "name": "Doug Sauder",
"address": "blow@example.com" "address": "dwsauder@example.com"
} }
}, },
"subject": { "subject": {
@@ -163,11 +156,8 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"from": { "message_id": {
"Address": { "Text": "39235E1C.1DC7EA90@example.com"
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -181,81 +171,17 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [ "html_body": [
0, 0,
1, 1,
@@ -276,10 +202,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -288,25 +211,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -315,8 +231,21 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "redball.png" "name": "redball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1776,18 +1705,19 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "greenball.png" "filename": "greenball.png"
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1798,6 +1728,7 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -3102,18 +3033,16 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "blueball.png" "filename": "blueball.png"
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3122,8 +3051,12 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+33 -82
View File
@@ -41,9 +41,20 @@ LCBlaW5pZ2UgVGllcmUsIHdlbGNoZSBhbHNvIHdvaGwgbm9jaCB1bmds/GNr
bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo= bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
---1463757054-891160829-958746372=:8452-- ---1463757054-891160829-958746372=:8452--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-891160829-958746372=:8452"
}
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"to": { "to": {
"AddressList": [ "AddressList": [
{ {
@@ -56,8 +67,11 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
} }
] ]
}, },
"mime_version": { "from": {
"Text": "1.0" "Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -72,79 +86,13 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "doug@penguin.example.com"
}
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": { "message_id": {
"Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com" "Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com"
}, },
"content_type": { "mime_version": {
"ContentType": { "Text": "1.0"
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "-1463757054-891160829-958746372=:8452"
}
}
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "date"
},
"start": 5,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 91
},
{
"name": {
"Rfc": "to"
},
"start": 94,
"end": 185
},
{
"name": {
"Rfc": "subject"
},
"start": 193,
"end": 240
},
{
"name": {
"Rfc": "message_id"
},
"start": 251,
"end": 315
},
{
"name": {
"Rfc": "mime_version"
},
"start": 328,
"end": 334
},
{
"name": {
"Rfc": "content_type"
},
"start": 347,
"end": 415
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -157,7 +105,7 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -168,40 +116,43 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
} }
} }
}, },
"is_encoding_problem": false,
"body": "\r" "body": "\r"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain", "c_subtype": "plain",
"attributes": { "attributes": {
"name": "HasenundFrösche.txt", "charset": "iso-8859-1",
"charset": "iso-8859-1" "name": "HasenundFrösche.txt"
} }
} }
}, },
"content_description": {
"Text": "Short story in German"
},
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "HasenundFrösche.txt" "filename": "HasenundFrösche.txt"
} }
} }
}, },
"content_transfer_encoding": {
"Text": "BASE64"
},
"content_id": { "content_id": {
"Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com" "Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com"
},
"content_description": {
"Text": "Short story in German"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+30 -107
View File
@@ -31,18 +31,8 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -56,14 +46,14 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": { "message_id": {
"ContentType": { "Text": "3923561C.B7078DEF@example.com"
"c_type": "text", },
"c_subtype": "plain", "subject": {
"attributes": { "Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
"charset": "iso-8859-1" },
} "mime_version": {
} "Text": "1.0"
}, },
"to": { "to": {
"Address": { "Address": {
@@ -71,105 +61,38 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
"address": "schmuergen@example.com" "address": "schmuergen@example.com"
} }
}, },
"mime_version": { "from": {
"Text": "1.0" "Address": {
}, "name": "Doug Sauder",
"subject": { "address": "dwsauder@example.com"
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)" }
},
"message_id": {
"Text": "3923561C.B7078DEF@example.com"
} }
}, },
"headers_other": {
"X-Accept-Language": {
"Text": "en"
},
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 277
},
{
"name": {
"Rfc": "subject"
},
"start": 285,
"end": 360
},
{
"name": {
"Rfc": "content_type"
},
"start": 373,
"end": 406
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 432,
"end": 451
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "iso-8859-1"
}
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+30 -101
View File
@@ -59,36 +59,11 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
--------------CA611088711119FBDB3473B4-- --------------CA611088711119FBDB3473B4--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------CA611088711119FBDB3473B4"
}
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"message_id": {
"Text": "392367BC.3D075C95@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -104,81 +79,32 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
}, },
"subject": { "subject": {
"Text": "Test message from Netscape Communicator 4.7" "Text": "Test message from Netscape Communicator 4.7"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"message_id": {
"Text": "392367BC.3D075C95@example.com"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------CA611088711119FBDB3473B4"
}
}
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -191,7 +117,7 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -205,12 +131,13 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"Text": "7bit" "Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
@@ -227,12 +154,14 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "HasenundFrösche.txt" "filename": "HasenundFrösche.txt"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+64 -131
View File
@@ -154,33 +154,8 @@ end
--------------177483472E7788F4AD46AB1A-- --------------177483472E7788F4AD46AB1A--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"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": "------------177483472E7788F4AD46AB1A"
}
}
},
"message_id": {
"Text": "3923670C.67D83A99@example.com"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -199,81 +174,32 @@ end
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "dwsauder@example.com" "address": "dwsauder@example.com"
} }
},
"message_id": {
"Text": "3923670C.67D83A99@example.com"
},
"mime_version": {
"Text": "1.0"
},
"to": {
"Address": {
"name": "Joe Blow",
"address": "blow@example.com"
}
},
"subject": {
"Text": "Test message from Netscape Communicator 4.7"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "------------177483472E7788F4AD46AB1A"
}
}
} }
}, },
"headers_other": {
"X-Mailer": {
"Text": "Mozilla 4.7 [en] (WinNT; I)"
},
"X-Accept-Language": {
"Text": "en"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 45
},
{
"name": {
"Rfc": "date"
},
"start": 50,
"end": 84
},
{
"name": {
"Rfc": "from"
},
"start": 89,
"end": 126
},
{
"name": {
"Other": "X-Mailer"
},
"start": 135,
"end": 165
},
{
"name": {
"Other": "X-Accept-Language"
},
"start": 183,
"end": 188
},
{
"name": {
"Rfc": "mime_version"
},
"start": 201,
"end": 207
},
{
"name": {
"Rfc": "to"
},
"start": 210,
"end": 240
},
{
"name": {
"Rfc": "subject"
},
"start": 248,
"end": 294
},
{
"name": {
"Rfc": "content_type"
},
"start": 307,
"end": 376
}
],
"html_body": [ "html_body": [
0, 0,
1, 1,
@@ -294,10 +220,7 @@ end
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -306,25 +229,18 @@ end
"charset": "us-ascii" "charset": "us-ascii"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "\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" "body": "\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"
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "redball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -333,8 +249,21 @@ end
"name": "redball.png" "name": "redball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "redball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
98, 98,
101, 101,
@@ -2409,7 +2338,10 @@ end
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -2419,18 +2351,17 @@ end
} }
} }
}, },
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "greenball.png" "filename": "greenball.png"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
98, 98,
101, 101,
@@ -4287,18 +4218,7 @@ end
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "x-uuencode"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "blueball.png"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -4307,8 +4227,21 @@ end
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "blueball.png"
}
}
},
"content_transfer_encoding": {
"Text": "x-uuencode"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
98, 98,
101, 101,
+21 -100
View File
File diff suppressed because one or more lines are too long
+49 -128
View File
@@ -108,25 +108,8 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
--=====================_715546120==_.REL-- --=====================_715546120==_.REL--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "related",
"attributes": {
"type": "text/html",
"boundary": "=====================_715546120==_.REL"
}
}
},
"message_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com"
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -140,6 +123,12 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"to": { "to": {
"Address": { "Address": {
"name": "Heinz Müller", "name": "Heinz Müller",
@@ -149,96 +138,23 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"from": { "content_type": {
"Address": { "ContentType": {
"name": "Doug Sauder", "c_type": "multipart",
"address": "dwsauder@example.com" "c_subtype": "related",
"attributes": {
"type": "text/html",
"boundary": "=====================_715546120==_.REL"
}
} }
},
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com"
} }
}, },
"headers_other": {
"X-Priority": {
"Text": "2 (High)"
},
"X-Sender": {
"Text": "dwsauder@pop.example.com (Unverified)"
},
"X-Mailer": {
"Text": "QUALCOMM Windows Eudora Pro Version 4.2.0.58"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 508
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -252,10 +168,7 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"parts": [ "parts": [
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -264,17 +177,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "<html>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.2\" width=27 height=27 alt=\"2aa658b6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.3\" width=27 height=27 alt=\"2aa658c0.png\"></font></html>\n" "body": "<html>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.2\" width=27 height=27 alt=\"2aa658b6.png\"><br>\n<br>\n<font face=\"Arial, Helvetica\" size=5 color=\"#0000FF\"><b>Die Hasen und die\nFrösche<br>\n<br>\n</font></b><font face=\"Arial, Helvetica\">Die Hasen klagten einst über\nihre mißliche Lage; &quot;wir leben&quot;, sprach ein Redner, &quot;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.&quot; <br>\n<br>\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. <br>\n<br>\n&quot;Halt&quot;, rief nun eben dieser Sprecher, &quot;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.&quot; <br>\n<br>\n<img src=\"cid:4.2.0.58.20000519003934.00a866f0@pop.example.com.3\" width=27 height=27 alt=\"2aa658c0.png\"></font></html>\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -290,12 +204,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "2aa658b6.png" "filename": "2aa658b6.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1627,7 +1546,22 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa658c0.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
},
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -1636,22 +1570,9 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
"name": "2aa658c0.png" "name": "2aa658c0.png"
} }
} }
},
"content_id": {
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"attributes": {
"filename": "2aa658c0.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+89 -162
View File
@@ -160,39 +160,8 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
--=====================_715515186==_-- --=====================_715515186==_--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche"
},
"message_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com"
},
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715515186==_"
}
}
},
"to": {
"Address": {
"name": "Heinz Müller",
"address": "mueller@example.com"
}
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2000, "year": 2000,
@@ -205,91 +174,38 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"tz_hour": 4, "tz_hour": 4,
"tz_minute": 0 "tz_minute": 0
} }
},
"message_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@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"
},
"from": {
"Address": {
"name": "Doug Sauder",
"address": "dwsauder@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "=====================_715515186==_"
}
}
} }
}, },
"headers_other": {
"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)"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "message_id"
},
"start": 11,
"end": 64
},
{
"name": {
"Other": "X-Sender"
},
"start": 73,
"end": 113
},
{
"name": {
"Other": "X-Mailer"
},
"start": 122,
"end": 170
},
{
"name": {
"Other": "X-Priority"
},
"start": 181,
"end": 192
},
{
"name": {
"Rfc": "date"
},
"start": 197,
"end": 231
},
{
"name": {
"Rfc": "to"
},
"start": 234,
"end": 288
},
{
"name": {
"Rfc": "from"
},
"start": 293,
"end": 330
},
{
"name": {
"Rfc": "subject"
},
"start": 338,
"end": 383
},
{
"name": {
"Rfc": "mime_version"
},
"start": 396,
"end": 402
},
{
"name": {
"Rfc": "content_type"
},
"start": 415,
"end": 482
}
],
"html_body": [ "html_body": [
1 1
], ],
@@ -305,13 +221,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "related", "c_type": "multipart",
"attributes": { "c_subtype": "related",
"type": "text/plain", "attributes": {
"boundary": "=====================_715515186==_.REL" "boundary": "=====================_715515186==_.REL",
"type": "text/plain"
}
} }
} }
} }
@@ -319,7 +237,10 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -328,27 +249,17 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"charset": "iso-8859-1" "charset": "iso-8859-1"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_id": {
"ContentType": { "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2"
"c_type": "inline",
"attributes": {
"filename": "2aa5e03a.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -359,10 +270,20 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
} }
} }
}, },
"content_id": { "content_disposition": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2" "ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa5e03a.png"
}
}
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -1694,9 +1615,15 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_disposition": {
"Text": "base64" "ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": {
"filename": "2aa5e044.png"
}
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -1710,15 +1637,11 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"content_id": { "content_id": {
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3" "Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3"
}, },
"content_disposition": { "content_transfer_encoding": {
"ContentType": { "Text": "base64"
"c_type": "inline",
"attributes": {
"filename": "2aa5e044.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -3178,15 +3101,19 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment", "c_type": "attachment",
"c_subtype": null,
"attributes": { "attributes": {
"filename": "blueball.png" "filename": "blueball.png"
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -3195,11 +3122,9 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "blueball.png" "name": "blueball.png"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
@@ -4531,15 +4456,7 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "greenball.png"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
@@ -4551,8 +4468,18 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
"name": "greenball.png" "name": "greenball.png"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "greenball.png"
}
}
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
137, 137,
80, 80,
+20 -99
View File
@@ -26,14 +26,10 @@ wenig aufschieben, denn auch uns f
welche also wohl noch unglücklicher sein müssen als wir." welche also wohl noch unglücklicher sein müssen als wir."
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": { "subject": {
"Address": { "Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -48,9 +44,6 @@ welche also wohl noch ungl
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
},
"message_id": { "message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com" "Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com"
}, },
@@ -59,106 +52,34 @@ welche also wohl noch ungl
"name": "Doug Sauder", "name": "Doug Sauder",
"address": "doug@example.com" "address": "doug@example.com"
} }
},
"to": {
"Address": {
"name": "Heinz M�ller",
"address": "mueller@example.com"
}
} }
}, },
"headers_other": {
"X-MSMail-Priority": {
"Text": "Normal"
},
"X-MimeOLE": {
"Text": "Produced By Microsoft MimeOLE V5.00.2314.1300"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"X-Mailer": {
"Text": "Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
},
"Importance": {
"Text": "Normal"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 82
},
{
"name": {
"Rfc": "subject"
},
"start": 90,
"end": 141
},
{
"name": {
"Rfc": "date"
},
"start": 146,
"end": 180
},
{
"name": {
"Rfc": "message_id"
},
"start": 191,
"end": 241
},
{
"name": {
"Other": "X-Priority"
},
"start": 252,
"end": 265
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 283,
"end": 292
},
{
"name": {
"Other": "X-Mailer"
},
"start": 301,
"end": 354
},
{
"name": {
"Other": "Importance"
},
"start": 365,
"end": 374
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 384,
"end": 432
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+22 -129
View File
@@ -31,15 +31,8 @@ noch ein wenig aufschieben, denn auch uns f=C3=BCrchten, wie ihr seht, =
einige Tiere, welche also wohl noch ungl=C3=BCcklicher sein m=C3=BCssen = einige Tiere, welche also wohl noch ungl=C3=BCcklicher sein m=C3=BCssen =
als wir."=20 als wir."=20
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com"
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
@@ -49,15 +42,6 @@ als wir."=20
"address": "doug@example.com" "address": "doug@example.com"
} }
}, },
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
}
}
},
"to": { "to": {
"Address": { "Address": {
"name": "Heinz Müller", "name": "Heinz Müller",
@@ -77,129 +61,38 @@ als wir."=20
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_transfer_encoding": { "subject": {
"Text": "quoted-printable" "Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
},
"message_id": {
"Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com"
} }
}, },
"headers_other": {
"Importance": {
"Text": "Normal"
},
"X-Priority": {
"Text": "3 (Normal)"
},
"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"
}
},
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 40
},
{
"name": {
"Rfc": "to"
},
"start": 43,
"end": 97
},
{
"name": {
"Rfc": "subject"
},
"start": 105,
"end": 177
},
{
"name": {
"Rfc": "date"
},
"start": 182,
"end": 216
},
{
"name": {
"Rfc": "message_id"
},
"start": 227,
"end": 277
},
{
"name": {
"Rfc": "mime_version"
},
"start": 290,
"end": 296
},
{
"name": {
"Rfc": "content_type"
},
"start": 309,
"end": 341
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 367,
"end": 386
},
{
"name": {
"Other": "X-Priority"
},
"start": 397,
"end": 410
},
{
"name": {
"Other": "X-MSMail-Priority"
},
"start": 428,
"end": 437
},
{
"name": {
"Other": "X-Mailer"
},
"start": 446,
"end": 499
},
{
"name": {
"Other": "Importance"
},
"start": 510,
"end": 519
},
{
"name": {
"Other": "X-MimeOLE"
},
"start": 529,
"end": 577
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "utf-8"
}
}
},
"content_transfer_encoding": {
"Text": "quoted-printable"
}
},
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
} }
+7 -48
View File
@@ -9,8 +9,7 @@ Content-Type: text/plain
Content-Type: text/html Content-Type: text/html
--:foo-- --:foo--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -22,54 +21,14 @@ Content-Type: text/html
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": { "attachments": [],
"Rfc": "content_type" "parts": [],
},
"start": 13,
"end": 47
}
],
"html_body": [
0,
1
],
"text_body": [
0,
1
],
"parts": [
{
"Text": {
"body": "Content-Type: text/plain"
}
},
{
"Text": {
"headers": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"body": "Content-Type: text/html"
}
}
],
"structure": { "structure": {
"List": [ "List": []
{
"Part": 0
},
{
"Part": 1
}
]
}, },
"offset_header": 0, "offset_header": 0,
"offset_body": 48, "offset_body": 48,
"offset_end": 159 "offset_end": 160
} }
+20 -17
View File
@@ -9,8 +9,7 @@ Content-Type: text/plain
--a --a
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -22,30 +21,24 @@ Content-Type: text/plain
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 45
}
],
"html_body": [ "html_body": [
1 1
], ],
"text_body": [ "text_body": [
1 1
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "a" "attributes": {
"boundary": "a"
}
} }
} }
} }
@@ -53,6 +46,16 @@ Content-Type: text/plain
}, },
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "Content-Type: text/plain\n" "body": "Content-Type: text/plain\n"
} }
} }
+16 -22
View File
@@ -2,34 +2,28 @@ Content-Type: multipart/mixed; boundary="ab"
body body
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{ "headers_rfc": {},
"headers_rfc": { "html_body": [],
"content_type": { "text_body": [],
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 45
}
],
"attachments": [ "attachments": [
0 0
], ],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
}
}
},
"is_encoding_problem": false,
"body": "body\n" "body": "body\n"
} }
} }
+15 -19
View File
@@ -8,8 +8,7 @@ Content-Type: text/plain
body body
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -21,27 +20,22 @@ body
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [ "attachments": [
1 1
], ],
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "a" "attributes": {
"boundary": "a"
}
} }
} }
} }
@@ -49,14 +43,16 @@ body
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "body\n" "body": "body\n"
} }
} }
+13 -11
View File
@@ -8,8 +8,7 @@ Content-Type: text/plain
body body
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -21,21 +20,24 @@ body
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [ "attachments": [
0 0
], ],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": true,
"body": "Content-Type: multipart/mixed; boundary=\"a\"\n\n--ac\nContent-Type: text/plain\n\nbody\n" "body": "Content-Type: multipart/mixed; boundary=\"a\"\n\n--ac\nContent-Type: text/plain\n\nbody\n"
} }
} }
+14 -19
View File
@@ -12,8 +12,7 @@ Content-Type: text/html
body2 body2
--a---- --a----
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -25,30 +24,24 @@ body2
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 46
}
],
"html_body": [ "html_body": [
1 1
], ],
"text_body": [ "text_body": [
1 1
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "a----" "attributes": {
"boundary": "a----"
}
} }
} }
} }
@@ -56,14 +49,16 @@ body2
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "body" "body": "body"
} }
} }
+15 -19
View File
@@ -8,8 +8,7 @@ Content-Type: text/plain
body body
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -21,27 +20,22 @@ body
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [ "attachments": [
1 1
], ],
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "ab" "attributes": {
"boundary": "ab"
}
} }
} }
} }
@@ -49,14 +43,16 @@ body
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "body\n" "body": "body\n"
} }
} }
+24 -20
View File
@@ -10,8 +10,7 @@ Content-Type: text/plain
--a-- --a--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -23,37 +22,42 @@ Content-Type: text/plain
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [ "attachments": [
1 1
], ],
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "mime_version": {
"c_type": "multipart", "Text": "1.0"
"c_subtype": "mixed", },
"attributes": { "content_type": {
"boundary": "ab" "ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "ab"
}
} }
} }
},
"mime_version": {
"Text": "1.0"
} }
} }
}, },
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": true,
"body": "--a--\n\n" "body": "--a--\n\n"
} }
} }
+15 -19
View File
@@ -12,8 +12,7 @@ Content-Type: text/html
body2 body2
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -25,27 +24,22 @@ body2
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 45
}
],
"attachments": [ "attachments": [
1 1
], ],
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "a" "attributes": {
"boundary": "a"
}
} }
} }
} }
@@ -53,14 +47,16 @@ body2
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "body\n--ab\nContent-Type: text/html\n\nbody2\n" "body": "body\n--ab\nContent-Type: text/html\n\nbody2\n"
} }
} }
+17 -21
View File
@@ -16,8 +16,7 @@ Content-Type: text/plain
333 333
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -29,15 +28,6 @@ Content-Type: text/plain
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [ "html_body": [
1 1
], ],
@@ -50,12 +40,14 @@ Content-Type: text/plain
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "2" "attributes": {
"boundary": "2"
}
} }
} }
} }
@@ -63,27 +55,31 @@ Content-Type: text/plain
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "1" "body": "1"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "22\n--1\nContent-Type: text/plain\n\n333\n" "body": "22\n--1\nContent-Type: text/plain\n\n333\n"
} }
} }
+29 -43
View File
@@ -6,98 +6,84 @@ Content-Type: text/plain
1 1
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 29
}
],
"attachments": [ "attachments": [
0 0
], ],
"parts": [ "parts": [
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 43,
"end": 59
}
],
"attachments": [ "attachments": [
0 0
], ],
"parts": [ "parts": [
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 73,
"end": 85
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "1\n" "body": "1\n"
} }
} }
+17 -21
View File
@@ -16,8 +16,7 @@ Content-Type: text/plain
333 333
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -29,15 +28,6 @@ Content-Type: text/plain
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [ "html_body": [
1 1
], ],
@@ -50,12 +40,14 @@ Content-Type: text/plain
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "2" "attributes": {
"boundary": "2"
}
} }
} }
} }
@@ -63,27 +55,31 @@ Content-Type: text/plain
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "1" "body": "1"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "22\n--1\nContent-Type: text/plain\n\n333\n" "body": "22\n--1\nContent-Type: text/plain\n\n333\n"
} }
} }
+44 -55
View File
@@ -22,8 +22,7 @@ Content-Type: text/plain
333 333
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -35,15 +34,8 @@ Content-Type: text/plain
} }
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"attachments": [ "attachments": [
1, 1,
2 2
@@ -51,12 +43,14 @@ Content-Type: text/plain
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "2" "attributes": {
"boundary": "2"
}
} }
} }
} }
@@ -64,41 +58,38 @@ Content-Type: text/plain
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain"
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 141,
"end": 153
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "1" "body": "1"
} }
} }
@@ -114,38 +105,36 @@ Content-Type: text/plain
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {},
"content_type": { "html_body": [],
"ContentType": { "text_body": [],
"c_type": "text",
"c_subtype": "plain"
}
}
},
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 203,
"end": 215
}
],
"attachments": [ "attachments": [
0 0
], ],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": true,
"body": "22\n--1\nContent-Type: message/rfc822\n\nContent-Type: text/plain\n\n333\n" "body": "22\n--1\nContent-Type: message/rfc822\n\nContent-Type: text/plain\n\n333\n"
} }
} }
+67 -69
View File
@@ -31,9 +31,11 @@ Content-Type: text/plain
hello, world hello, world
--1 --1
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -42,27 +44,8 @@ hello, world
"boundary": "1" "boundary": "1"
} }
} }
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
},
{
"name": {
"Rfc": "mime_version"
},
"start": 57,
"end": 62
}
],
"html_body": [ "html_body": [
0, 0,
2, 2,
@@ -75,31 +58,36 @@ hello, world
4, 4,
6 6
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "hello, world" "body": "hello, world"
} }
}, },
{ {
"Multipart": { "Multipart": {
"mime_version": { "headers_rfc": {
"Text": "2.0" "mime_version": {
}, "Text": "2.0"
"content_type": { },
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "1" "attributes": {
"boundary": "1"
}
} }
} }
} }
@@ -107,54 +95,32 @@ hello, world
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "hello, world" "body": "hello, world"
} }
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "mime_version": {
"c_type": "multipart", "Text": "abc"
"c_subtype": "mixed", },
"attributes": {
"boundary": "1"
}
}
},
"mime_version": {
"Text": "abc"
}
}
},
{
"Text": {
"headers": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "multipart",
"c_subtype": "plain" "c_subtype": "mixed",
} "attributes": {
} "boundary": "1"
}, }
"body": "hello, world"
}
},
{
"Multipart": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
} }
} }
} }
@@ -162,14 +128,46 @@ hello, world
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "hello, world"
}
},
{
"Multipart": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "1"
}
}
}
}
}
},
{
"Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "hello, world" "body": "hello, world"
} }
} }
+6 -13
View File
@@ -6,8 +6,7 @@ Content-Type: text/plain
hello, world hello, world
--1 --1
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -19,32 +18,26 @@ hello, world
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "hello, world" "body": "hello, world"
} }
} }
+42 -98
View File
@@ -24,44 +24,8 @@ invalid
--=-GNQXLhuj24Pl1aCkk4/d-- --=-GNQXLhuj24Pl1aCkk4/d--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"message_id": {
"Text": "1.2.3.4@example"
},
"subject": {
"Text": "Hello world"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
"micalg": "pgp-sha1",
"protocol": "application/pgp-signature"
}
}
},
"to": {
"Address": {
"name": "Another User",
"address": "test2@example.org"
}
},
"return_path": {
"Text": "test@example.org"
},
"mime_version": {
"Text": "1.0"
},
"from": {
"Address": {
"name": "Test User",
"address": "test@example.org"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2007, "year": 2007,
@@ -74,66 +38,43 @@ invalid
"tz_hour": 3, "tz_hour": 3,
"tz_minute": 0 "tz_minute": 0
} }
},
"return_path": {
"Text": "test@example.org"
},
"subject": {
"Text": "Hello world"
},
"from": {
"Address": {
"name": "Test User",
"address": "test@example.org"
}
},
"to": {
"Address": {
"name": "Another User",
"address": "test2@example.org"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "signed",
"attributes": {
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
"protocol": "application/pgp-signature",
"micalg": "pgp-sha1"
}
}
},
"message_id": {
"Text": "1.2.3.4@example"
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "return_path"
},
"start": 12,
"end": 32
},
{
"name": {
"Rfc": "subject"
},
"start": 40,
"end": 53
},
{
"name": {
"Rfc": "from"
},
"start": 58,
"end": 88
},
{
"name": {
"Rfc": "to"
},
"start": 91,
"end": 125
},
{
"name": {
"Rfc": "message_id"
},
"start": 136,
"end": 155
},
{
"name": {
"Rfc": "mime_version"
},
"start": 168,
"end": 173
},
{
"name": {
"Rfc": "date"
},
"start": 178,
"end": 211
},
{
"name": {
"Rfc": "content_type"
},
"start": 224,
"end": 334
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -146,23 +87,25 @@ invalid
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "There was a day \na happy day\n" "body": "There was a day \na happy day\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
@@ -173,6 +116,7 @@ invalid
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
105, 105,
110, 110,
+25 -27
View File
@@ -23,8 +23,7 @@ Content-Type: text/plain
4444 4444
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -36,15 +35,6 @@ Content-Type: text/plain
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 125
}
],
"html_body": [ "html_body": [
2 2
], ],
@@ -57,12 +47,14 @@ Content-Type: text/plain
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "123456789012345678901234567890123456789012345678901234567890123456789012345678901" "attributes": {
"boundary": "123456789012345678901234567890123456789012345678901234567890123456789012345678901"
}
} }
} }
} }
@@ -70,12 +62,14 @@ Content-Type: text/plain
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "12345678901234567890123456789012345678901234567890123456789012345678901234567890" "attributes": {
"boundary": "12345678901234567890123456789012345678901234567890123456789012345678901234567890"
}
} }
} }
} }
@@ -83,27 +77,31 @@ Content-Type: text/plain
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333" "body": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "4444\n" "body": "4444\n"
} }
} }
+72 -127
View File
@@ -71,27 +71,11 @@ Content-Transfer-Encoding: Quoted-printable
--unique-boundary-1-- --unique-boundary-1--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "unique-boundary-1"
}
}
},
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Nathaniel Borenstein", "name": "Nathaniel Borenstein",
@@ -113,52 +97,23 @@ Content-Transfer-Encoding: Quoted-printable
"tz_hour": 7, "tz_hour": 7,
"tz_minute": 0 "tz_minute": 0
} }
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "unique-boundary-1"
}
}
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "mime_version"
},
"start": 13,
"end": 18
},
{
"name": {
"Rfc": "from"
},
"start": 23,
"end": 62
},
{
"name": {
"Rfc": "to"
},
"start": 65,
"end": 95
},
{
"name": {
"Rfc": "date"
},
"start": 100,
"end": 139
},
{
"name": {
"Rfc": "subject"
},
"start": 147,
"end": 168
},
{
"name": {
"Rfc": "content_type"
},
"start": 181,
"end": 238
}
],
"html_body": [ "html_body": [
0, 0,
1 1
@@ -176,12 +131,22 @@ Content-Transfer-Encoding: Quoted-printable
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "... 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" "body": "... 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": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -192,17 +157,20 @@ Content-Transfer-Encoding: Quoted-printable
} }
} }
}, },
"is_encoding_problem": false,
"body": "This could have been part of the previous part, but\nillustrates explicit versus implicit typing of body\nparts.\n" "body": "This could have been part of the previous part, but\nillustrates explicit versus implicit typing of body\nparts.\n"
} }
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "parallel", "c_type": "multipart",
"attributes": { "c_subtype": "parallel",
"boundary": "unique-boundary-2" "attributes": {
"boundary": "unique-boundary-2"
}
} }
} }
} }
@@ -210,133 +178,110 @@ Content-Transfer-Encoding: Quoted-printable
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "audio", "c_type": "audio",
"c_subtype": "basic" "c_subtype": "basic",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "... base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n" "body": "... base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
"c_subtype": "jpeg" "c_subtype": "jpeg",
"attributes": null
} }
} }
}, },
"is_encoding_problem": true,
"body": "... base64-encoded image data goes here ...\n" "body": "... base64-encoded image data goes here ...\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "enriched" "c_subtype": "enriched",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "This is <bold><italic>enriched.</italic></bold>\n<smaller>as defined in RFC 1896</smaller>\n\nIsn't it\n<bigger><bigger>cool?</bigger></bigger>\n" "body": "This is <bold><italic>enriched.</italic></bold>\n<smaller>as defined in RFC 1896</smaller>\n\nIsn't it\n<bigger><bigger>cool?</bigger></bigger>\n"
} }
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"to": { "to": {
"Address": { "Address": {
"name": "address in US-ASCII" "name": "address in US-ASCII",
} "address": null
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "ISO-8859-1"
}
} }
}, },
"from": { "from": {
"Address": { "Address": {
"name": "mailbox in US-ASCII" "name": "mailbox in US-ASCII",
"address": null
} }
}, },
"content_transfer_encoding": {
"Text": "Quoted-printable"
},
"subject": { "subject": {
"Text": "(subject in US-ASCII)" "Text": "(subject in US-ASCII)"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 1612,
"end": 1635
},
{
"name": {
"Rfc": "to"
},
"start": 1638,
"end": 1661
},
{
"name": {
"Rfc": "subject"
},
"start": 1669,
"end": 1692
},
{
"name": {
"Rfc": "content_type"
},
"start": 1705,
"end": 1737
},
{
"name": {
"Rfc": "content_transfer_encoding"
},
"start": 1763,
"end": 1781
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "Quoted-printable"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "ISO-8859-1"
}
}
}
},
"is_encoding_problem": false,
"body": "... Additional text in ISO-8859-1 goes here ...\n" "body": "... Additional text in ISO-8859-1 goes here ...\n"
} }
} }
+33 -85
View File
@@ -39,14 +39,25 @@ get RFC-MIME.DOC
--42-- --42--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"message_id": { "content_id": {
"Text": "id1@host.com" "Text": "id001@guppylake.bellcore.com"
},
"to": {
"Address": {
"name": "Someone",
"address": null
}
},
"from": {
"Address": {
"name": "Whomever",
"address": null
}
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -57,81 +68,15 @@ get RFC-MIME.DOC
} }
} }
}, },
"content_id": { "message_id": {
"Text": "id001@guppylake.bellcore.com" "Text": "id1@host.com"
},
"to": {
"Address": {
"name": "Someone"
}
}, },
"subject": { "subject": {
"Text": "whatever" "Text": "whatever"
},
"from": {
"Address": {
"name": "Whomever"
}
} }
}, },
"headers_offsets": [ "html_body": [],
{ "text_body": [],
"name": {
"Rfc": "from"
},
"start": 5,
"end": 15
},
{
"name": {
"Rfc": "to"
},
"start": 18,
"end": 27
},
{
"name": {
"Rfc": "date"
},
"start": 32,
"end": 42
},
{
"name": {
"Rfc": "subject"
},
"start": 50,
"end": 60
},
{
"name": {
"Rfc": "mime_version"
},
"start": 73,
"end": 78
},
{
"name": {
"Rfc": "message_id"
},
"start": 89,
"end": 105
},
{
"name": {
"Rfc": "content_type"
},
"start": 118,
"end": 154
},
{
"name": {
"Rfc": "content_id"
},
"start": 165,
"end": 197
}
],
"attachments": [ "attachments": [
0, 0,
1, 1,
@@ -140,22 +85,23 @@ get RFC-MIME.DOC
"parts": [ "parts": [
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "external-body", "c_subtype": "external-body",
"attributes": { "attributes": {
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)", "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
"directory": "pub",
"mode": "image", "mode": "image",
"site": "thumper.bellcore.com",
"name": "BodyFormats.ps", "name": "BodyFormats.ps",
"site": "thumper.bellcore.com", "access-type": "ANON-FTP",
"access-type": "ANON-FTP" "directory": "pub"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
67, 67,
111, 111,
@@ -241,20 +187,21 @@ get RFC-MIME.DOC
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "external-body", "c_subtype": "external-body",
"attributes": { "attributes": {
"site": "thumper.bellcore.com",
"access-type": "local-file", "access-type": "local-file",
"site": "thumper.bellcore.com", "name": "/u/nsb/writing/rfcs/RFC-MIME.ps",
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)", "expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
"name": "/u/nsb/writing/rfcs/RFC-MIME.ps"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
67, 67,
111, 111,
@@ -340,19 +287,20 @@ get RFC-MIME.DOC
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "external-body", "c_subtype": "external-body",
"attributes": { "attributes": {
"access-type": "mail-server",
"server": "listserv@bogus.bitnet", "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"
} }
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
67, 67,
111, 111,
+60 -155
View File
@@ -71,18 +71,8 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
--D7F------------D7FD5A0B8AB9C65CCDBFA872-- --D7F------------D7FD5A0B8AB9C65CCDBFA872--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872"
}
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Al Gore", "name": "Al Gore",
@@ -97,38 +87,17 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
}, },
"subject": { "subject": {
"Text": "[Fwd: Map of Argentina with Description]" "Text": "[Fwd: Map of Argentina with Description]"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872"
}
}
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 47
},
{
"name": {
"Rfc": "to"
},
"start": 50,
"end": 123
},
{
"name": {
"Rfc": "subject"
},
"start": 131,
"end": 173
},
{
"name": {
"Rfc": "content_type"
},
"start": 186,
"end": 269
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -141,7 +110,7 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "7bit" "Text": "7bit"
}, },
@@ -155,38 +124,68 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
} }
} }
}, },
"is_encoding_problem": false,
"body": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl" "body": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl"
} }
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline" "c_type": "inline",
"c_subtype": null,
"attributes": null
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"return_path": {
"Text": "president@whitehouse.gov"
},
"message_id": { "message_id": {
"Text": "199804130742.RAA20366@mai1host.whitehouse.gov" "Text": "199804130742.RAA20366@mai1host.whitehouse.gov"
}, },
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
}
}
},
"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 <vice-president@heartbeat.whitehouse.gov>;\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"
}
]
},
"to": {
"Address": {
"name": "A1 Gore (The Enforcer)",
"address": "vice-president@whitehouse.gov"
}
},
"subject": { "subject": {
"Text": "Map of Argentina with Description" "Text": "Map of Argentina with Description"
}, },
"mime_version": {
"Text": "1.0"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 1998, "year": 1998,
@@ -200,113 +199,16 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"tz_minute": 0 "tz_minute": 0
} }
}, },
"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 <vice-president@heartbeat.whitehouse.gov>;\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"
}
]
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
}
}
},
"to": {
"Address": {
"name": "A1 Gore (The Enforcer)",
"address": "vice-president@whitehouse.gov"
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Bill Clinton", "name": "Bill Clinton",
"address": "president@whitehouse.gov" "address": "president@whitehouse.gov"
} }
}, },
"mime_version": { "return_path": {
"Text": "1.0" "Text": "president@whitehouse.gov"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "return_path"
},
"start": 639,
"end": 667
},
{
"name": {
"Rfc": "received"
},
"start": 676,
"end": 893
},
{
"name": {
"Rfc": "received"
},
"start": 902,
"end": 1100
},
{
"name": {
"Rfc": "date"
},
"start": 1105,
"end": 1138
},
{
"name": {
"Rfc": "message_id"
},
"start": 1149,
"end": 1198
},
{
"name": {
"Rfc": "from"
},
"start": 1203,
"end": 1244
},
{
"name": {
"Rfc": "to"
},
"start": 1247,
"end": 1303
},
{
"name": {
"Rfc": "subject"
},
"start": 1311,
"end": 1347
},
{
"name": {
"Rfc": "mime_version"
},
"start": 1360,
"end": 1365
},
{
"name": {
"Rfc": "content_type"
},
"start": 1378,
"end": 1461
}
],
"html_body": [ "html_body": [
0, 0,
1 1
@@ -321,7 +223,7 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -335,23 +237,25 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
"Text": "7bit" "Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "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" "body": "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"
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline", "c_type": "inline",
"c_subtype": null,
"attributes": { "attributes": {
"fi1ename": "map_of_Argentina.gif" "fi1ename": "map_of_Argentina.gif"
} }
} }
}, },
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
@@ -362,6 +266,7 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
71, 71,
77, 77,
+24 -64
View File
@@ -23,16 +23,12 @@ Content-Type: application/x-whatever
--boundary42-- --boundary42--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "from": {
"ContentType": { "Address": {
"c_type": "multipart", "name": "Nathaniel Borenstein",
"c_subtype": "alternative", "address": "nsb@bellcore.com"
"attributes": {
"boundary": "boundary42"
}
} }
}, },
"subject": { "subject": {
@@ -44,12 +40,6 @@ Content-Type: application/x-whatever
"address": "ned@innosoft.com" "address": "ned@innosoft.com"
} }
}, },
"from": {
"Address": {
"name": "Nathaniel Borenstein",
"address": "nsb@bellcore.com"
}
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 1993, "year": 1993,
@@ -65,52 +55,17 @@ Content-Type: application/x-whatever
}, },
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "boundary42"
}
}
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 46
},
{
"name": {
"Rfc": "to"
},
"start": 49,
"end": 79
},
{
"name": {
"Rfc": "date"
},
"start": 84,
"end": 123
},
{
"name": {
"Rfc": "subject"
},
"start": 131,
"end": 152
},
{
"name": {
"Rfc": "mime_version"
},
"start": 165,
"end": 170
},
{
"name": {
"Rfc": "content_type"
},
"start": 183,
"end": 227
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -124,7 +79,7 @@ Content-Type: application/x-whatever
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -135,32 +90,37 @@ Content-Type: application/x-whatever
} }
} }
}, },
"is_encoding_problem": false,
"body": "... plain text version of message goes here ...\n" "body": "... plain text version of message goes here ...\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "enriched" "c_subtype": "enriched",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "... RFC 1896 text/enriched version of same message\n goes here ...\n" "body": "... RFC 1896 text/enriched version of same message\n goes here ...\n"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
"c_subtype": "x-whatever" "c_subtype": "x-whatever",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
46, 46,
46, 46,
+66 -115
View File
@@ -34,12 +34,17 @@ Subject: my different opinion
------ main boundary ------ ------ main boundary ------
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
}, },
"to": {
"Address": {
"name": "Recipient-List",
"address": null
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -49,18 +54,14 @@ Subject: my different opinion
} }
} }
}, },
"subject": {
"Text": "Internet Digest, volume 42"
},
"from": { "from": {
"Address": { "Address": {
"name": "Moderator-Address" "name": "Moderator-Address",
"address": null
} }
}, },
"to": { "subject": {
"Address": { "Text": "Internet Digest, volume 42"
"name": "Recipient-List"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -76,50 +77,6 @@ Subject: my different opinion
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 24
},
{
"name": {
"Rfc": "to"
},
"start": 27,
"end": 43
},
{
"name": {
"Rfc": "date"
},
"start": 48,
"end": 81
},
{
"name": {
"Rfc": "subject"
},
"start": 89,
"end": 117
},
{
"name": {
"Rfc": "mime_version"
},
"start": 130,
"end": 135
},
{
"name": {
"Rfc": "content_type"
},
"start": 148,
"end": 213
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -133,17 +90,29 @@ Subject: my different opinion
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "...Introductory text or table of contents...\n" "body": "...Introductory text or table of contents...\n"
} }
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "digest", "c_type": "multipart",
"attributes": { "c_subtype": "digest",
"boundary": "---- next message ----" "attributes": {
"boundary": "---- next message ----"
}
} }
} }
} }
@@ -151,19 +120,22 @@ Subject: my different opinion
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"from": { "from": {
"Address": { "Address": {
"name": "someone-else" "name": "someone-else",
"address": null
} }
}, },
"date": { "date": {
@@ -183,38 +155,26 @@ Subject: my different opinion
"Text": "my opinion" "Text": "my opinion"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 423,
"end": 437
},
{
"name": {
"Rfc": "date"
},
"start": 442,
"end": 475
},
{
"name": {
"Rfc": "subject"
},
"start": 483,
"end": 495
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "...body goes here ...\n" "body": "...body goes here ...\n"
} }
} }
@@ -230,14 +190,16 @@ Subject: my different opinion
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"date": { "date": {
@@ -253,47 +215,36 @@ Subject: my different opinion
"tz_minute": 0 "tz_minute": 0
} }
}, },
"subject": {
"Text": "my different opinion"
},
"from": { "from": {
"Address": { "Address": {
"name": "someone-else-again" "name": "someone-else-again",
"address": null
} }
},
"subject": {
"Text": "my different opinion"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 550,
"end": 570
},
{
"name": {
"Rfc": "date"
},
"start": 575,
"end": 608
},
{
"name": {
"Rfc": "subject"
},
"start": 616,
"end": 638
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "... another body goes here ...\n" "body": "... another body goes here ...\n"
} }
} }
+32 -65
View File
@@ -23,23 +23,28 @@ It DOES end with a linebreak.
This is the epilogue. It is also to be ignored. This is the epilogue. It is also to be ignored.
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "mixed",
"attributes": {
"boundary": "simple boundary"
}
}
},
"from": { "from": {
"Address": { "Address": {
"name": "Nathaniel Borenstein", "name": "Nathaniel Borenstein",
"address": "nsb@bellcore.com" "address": "nsb@bellcore.com"
} }
}, },
"mime_version": { "subject": {
"Text": "1.0" "Text": "Sample message"
},
"to": {
"Address": {
"name": "Ned Freed",
"address": "ned@innosoft.com"
}
}, },
"date": { "date": {
"DateTime": { "DateTime": {
@@ -54,63 +59,13 @@ This is the epilogue. It is also to be ignored.
"tz_minute": 0 "tz_minute": 0
} }
}, },
"content_type": { "to": {
"ContentType": { "Address": {
"c_type": "multipart", "name": "Ned Freed",
"c_subtype": "mixed", "address": "ned@innosoft.com"
"attributes": {
"boundary": "simple boundary"
}
} }
},
"subject": {
"Text": "Sample message"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 46
},
{
"name": {
"Rfc": "to"
},
"start": 49,
"end": 79
},
{
"name": {
"Rfc": "date"
},
"start": 84,
"end": 123
},
{
"name": {
"Rfc": "subject"
},
"start": 131,
"end": 147
},
{
"name": {
"Rfc": "mime_version"
},
"start": 160,
"end": 165
},
{
"name": {
"Rfc": "content_type"
},
"start": 178,
"end": 223
}
],
"html_body": [ "html_body": [
0, 0,
1 1
@@ -119,15 +74,26 @@ This is the epilogue. It is also to be ignored.
0, 0,
1 1
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak." "body": "This is implicitly typed plain US-ASCII text.\nIt does NOT end with a linebreak."
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -138,6 +104,7 @@ This is the epilogue. It is also to be ignored.
} }
} }
}, },
"is_encoding_problem": false,
"body": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n" "body": "This is explicitly typed plain US-ASCII text.\nIt DOES end with a linebreak.\n"
} }
} }
+30 -52
View File
@@ -21,22 +21,14 @@ Content-Disposition: inline
--boundary-string-- --boundary-string--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"to": {
"Address": {
"address": "recipient@example.com"
}
},
"from": { "from": {
"Address": { "Address": {
"name": null,
"address": "sender@example.com" "address": "sender@example.com"
} }
}, },
"subject": {
"Text": "Multipart Email Example"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -45,56 +37,31 @@ Content-Disposition: inline
"boundary": "boundary-string" "boundary": "boundary-string"
} }
} }
},
"subject": {
"Text": "Multipart Email Example"
},
"to": {
"Address": {
"name": null,
"address": "recipient@example.com"
}
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "from"
},
"start": 5,
"end": 25
},
{
"name": {
"Rfc": "to"
},
"start": 28,
"end": 51
},
{
"name": {
"Rfc": "subject"
},
"start": 59,
"end": 84
},
{
"name": {
"Rfc": "content_type"
},
"start": 97,
"end": 148
}
],
"html_body": [ "html_body": [
1 1
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
}, },
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -103,19 +70,22 @@ Content-Disposition: inline
"charset": "utf-8" "charset": "utf-8"
} }
} }
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": null
}
} }
}, },
"is_encoding_problem": false,
"body": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n" "body": "Plain text email goes here!\nThis is the fallback if email client does not support HTML\n"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -127,8 +97,16 @@ Content-Disposition: inline
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": null
}
} }
}, },
"is_encoding_problem": false,
"body": "<h1>This is the HTML Section!</h1>\n<p>This is what displays in most modern email clients</p>\n" "body": "<h1>This is the HTML Section!</h1>\n<p>This is what displays in most modern email clients</p>\n"
} }
} }
+117 -92
View File
@@ -71,9 +71,11 @@ Content-Disposition: inline
K K
--1-- --1--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "RFC 8621 Section 4.1.4 test"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -82,27 +84,8 @@ K
"boundary": "1" "boundary": "1"
} }
} }
},
"subject": {
"Text": "RFC 8621 Section 4.1.4 test"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "subject"
},
"start": 8,
"end": 37
},
{
"name": {
"Rfc": "content_type"
},
"start": 50,
"end": 81
}
],
"html_body": [ "html_body": [
0, 0,
8, 8,
@@ -125,30 +108,36 @@ K
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline"
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
}
},
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "A" "body": "A"
} }
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "2" "attributes": {
"boundary": "2"
}
} }
} }
} }
@@ -156,12 +145,14 @@ K
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "3" "attributes": {
"boundary": "3"
}
} }
} }
} }
@@ -169,12 +160,14 @@ K
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "mixed", "c_type": "multipart",
"attributes": { "c_subtype": "mixed",
"boundary": "4" "attributes": {
"boundary": "4"
}
} }
} }
} }
@@ -182,37 +175,45 @@ K
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline" "c_type": "inline",
"c_subtype": null,
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "B" "body": "B"
} }
}, },
{ {
"InlineBinary": { "InlineBinary": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": null
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
"c_subtype": "jpeg" "c_subtype": "jpeg",
} "attributes": null
},
"content_disposition": {
"ContentType": {
"c_type": "inline"
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
67 67
] ]
@@ -220,30 +221,36 @@ K
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "inline",
"c_subtype": null,
"attributes": null
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
} "attributes": null
},
"content_disposition": {
"ContentType": {
"c_type": "inline"
} }
} }
}, },
"is_encoding_problem": false,
"body": "D" "body": "D"
} }
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "related", "c_type": "multipart",
"attributes": { "c_subtype": "related",
"boundary": "5" "attributes": {
"boundary": "5"
}
} }
} }
} }
@@ -251,27 +258,31 @@ K
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "html" "c_subtype": "html",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "<html>E</html>" "body": "<html>E</html>"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
"c_subtype": "jpeg" "c_subtype": "jpeg",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
70 70
] ]
@@ -279,19 +290,23 @@ K
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "attachment" "c_type": "attachment",
"c_subtype": null,
"attributes": null
} }
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "image", "c_type": "image",
"c_subtype": "jpeg" "c_subtype": "jpeg",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
71 71
] ]
@@ -299,14 +314,16 @@ K
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "application", "c_type": "application",
"c_subtype": "x-excel" "c_subtype": "x-excel",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
72 72
] ]
@@ -314,38 +331,42 @@ K
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"subject": { "subject": {
"Text": "J" "Text": "J"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "subject"
},
"start": 789,
"end": 792
}
],
"html_body": [ "html_body": [
0 0
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": null
}
}
},
"is_encoding_problem": false,
"body": "J" "body": "J"
} }
} }
@@ -361,19 +382,23 @@ K
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
}, },
"content_disposition": { "content_disposition": {
"ContentType": { "ContentType": {
"c_type": "inline" "c_type": "inline",
"c_subtype": null,
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "K" "body": "K"
} }
} }
+54 -115
View File
@@ -28,8 +28,7 @@ CiAgPC9oZWFkPg0KICA8Ym9keT4NCiAgICBUaGlzIGlzIGFuIDxiPkhUTUw8L2I+IHRlc3QgbWVz
c2FnZQ0KICA8L2JvZHk+DQo8L2h0bWw+DQoNCi0tYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh c2FnZQ0KICA8L2JvZHk+DQo8L2h0bWw+DQoNCi0tYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFhYWFh
YWFhYWFhYWFhYWFhYS0tDQo= YWFhYWFhYWFhYWFhYS0tDQo=
--bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb-- --bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -41,15 +40,6 @@ YWFhYWFhYWFhYWFhYS0tDQo=
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 82
}
],
"html_body": [ "html_body": [
0 0
], ],
@@ -62,10 +52,7 @@ YWFhYWFhYWFhYWFhYS0tDQo=
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -74,61 +61,41 @@ YWFhYWFhYWFhYWFhYS0tDQo=
"charset": "utf-8" "charset": "utf-8"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "This is a message with a base64 encoded attached email" "body": "This is a message with a base64 encoded attached email"
} }
}, },
{ {
"Message": { "Message": {
"headers": { "headers_rfc": {
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"attributes": {
"filename": "attached_email.eml"
}
}
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "message", "c_type": "message",
"c_subtype": "rfc822" "c_subtype": "rfc822",
"attributes": null
} }
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
},
"content_disposition": {
"ContentType": {
"c_type": "attachment",
"c_subtype": null,
"attributes": {
"filename": "attached_email.eml"
}
}
} }
}, },
"is_encoding_problem": false,
"body": { "body": {
"headers_rfc": { "headers_rfc": {
"subject": {
"Text": "HTML test"
},
"to": {
"Address": {
"name": "email@example.com",
"address": "email@example.com"
}
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
}
},
"from": {
"Address": {
"name": "Name",
"address": "email@example.com"
}
},
"content_language": {
"Text": "en-US"
},
"date": { "date": {
"DateTime": { "DateTime": {
"year": 2021, "year": 2021,
@@ -142,6 +109,33 @@ YWFhYWFhYWFhYWFhYS0tDQo=
"tz_minute": 0 "tz_minute": 0
} }
}, },
"from": {
"Address": {
"name": "Name",
"address": "email@example.com"
}
},
"to": {
"Address": {
"name": "email@example.com",
"address": "email@example.com"
}
},
"content_language": {
"Text": "en-US"
},
"content_type": {
"ContentType": {
"c_type": "multipart",
"c_subtype": "alternative",
"attributes": {
"boundary": "aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
}
},
"subject": {
"Text": "HTML test"
},
"message_id": { "message_id": {
"Text": "random-message-id@example.com" "Text": "random-message-id@example.com"
}, },
@@ -149,74 +143,17 @@ YWFhYWFhYWFhYWFhYS0tDQo=
"Text": "1.0" "Text": "1.0"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "to"
},
"start": 3,
"end": 45
},
{
"name": {
"Rfc": "from"
},
"start": 50,
"end": 77
},
{
"name": {
"Rfc": "subject"
},
"start": 85,
"end": 97
},
{
"name": {
"Rfc": "message_id"
},
"start": 108,
"end": 142
},
{
"name": {
"Rfc": "date"
},
"start": 147,
"end": 181
},
{
"name": {
"Rfc": "mime_version"
},
"start": 194,
"end": 200
},
{
"name": {
"Rfc": "content_type"
},
"start": 213,
"end": 292
},
{
"name": {
"Rfc": "content_language"
},
"start": 309,
"end": 317
}
],
"html_body": [ "html_body": [
1 1
], ],
"text_body": [ "text_body": [
0 0
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -231,12 +168,16 @@ YWFhYWFhYWFhYWFhYS0tDQo=
"Text": "7bit" "Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "This is an *HTML* test message\r" "body": "This is an *HTML* test message\r"
} }
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "7bit"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -245,11 +186,9 @@ YWFhYWFhYWFhYWFhYS0tDQo=
"charset": "utf-8" "charset": "utf-8"
} }
} }
},
"content_transfer_encoding": {
"Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "<html>\r\n <head>\r\n <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\r\n </head>\r\n <body>\r\n This is an <b>HTML</b> test message\r\n </body>\r\n</html>\r\n\r" "body": "<html>\r\n <head>\r\n <meta http-equiv=\"content-type\" content=\"text/html; charset=UTF-8\">\r\n </head>\r\n <body>\r\n This is an <b>HTML</b> test message\r\n </body>\r\n</html>\r\n\r"
} }
} }
+13 -25
View File
@@ -18,8 +18,7 @@ Content-Transfer-Encoding: base64
ZWg= ZWg=
--bound-- --bound--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
@@ -34,22 +33,6 @@ ZWg=
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "mime_version"
},
"start": 13,
"end": 19
},
{
"name": {
"Rfc": "content_type"
},
"start": 32,
"end": 76
}
],
"html_body": [ "html_body": [
0, 0,
1 1
@@ -58,36 +41,41 @@ ZWg=
0, 0,
1 1
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": "we have\ra lot \nof \u0000binary stuff in here\nb adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a" "body": "we have\ra lot \nof \u0000binary stuff in here\nb adjig sadjg jasidgjiaehga3wht8a3w8ghxjc dsgad hasdghsd gasd dsjdsoga sjdga0w3tjhawjgsertniq3n5oqerjqw2r89q23h awhrqh835r8a"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
}, },
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "base64" "Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": "eh" "body": "eh"
} }
} }
+17 -27
View File
@@ -23,8 +23,7 @@ hello world
--bound-- --bound--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": { "mime_version": {
"Text": "1.0" "Text": "1.0"
@@ -39,22 +38,6 @@ hello world
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "mime_version"
},
"start": 13,
"end": 19
},
{
"name": {
"Rfc": "content_type"
},
"start": 32,
"end": 76
}
],
"html_body": [ "html_body": [
0, 0,
1, 1,
@@ -65,49 +48,56 @@ hello world
1, 1,
2 2
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "binary"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
},
"content_transfer_encoding": {
"Text": "binary"
} }
}, },
"is_encoding_problem": false,
"body": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz\r\naWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk\r\nZ2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=\r" "body": "d2UgaGF2ZQ1hIGxvdCAKb2YgAGJpbmFyeSBzdHVmZiBpbiBoZXJlCmIgYWRqaWcgc2FkamcgamFz\r\naWRnamlhZWhnYTN3aHQ4YTN3OGdoeGpjIGRzZ2FkIGhhc2RnaHNkIGdhc2QgZHNqZHNvZ2Egc2pk\r\nZ2EwdzN0amhhd2pnc2VydG5pcTNuNW9xZXJqcXcycjg5cTIzaCBhd2hycWg4MzVyOGE=\r"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "binary" "Text": "binary"
}, },
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "ZWg=" "body": "ZWg="
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
} }
}, },
"is_encoding_problem": false,
"body": "hello world\r\n\r" "body": "hello world\r\n\r"
} }
} }
+16 -23
View File
@@ -18,8 +18,7 @@ Content-Type: text/plain; charset=utf-8
?garbage ?garbage
--foo-- --foo--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -31,15 +30,6 @@ Content-Type: text/plain; charset=utf-8
} }
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
}
],
"html_body": [ "html_body": [
0, 0,
1 1
@@ -54,10 +44,7 @@ Content-Type: text/plain; charset=utf-8
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "quoted-printable"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -66,14 +53,21 @@ Content-Type: text/plain; charset=utf-8
"charset": "utf-8" "charset": "utf-8"
} }
} }
},
"content_transfer_encoding": {
"Text": "quoted-printable"
} }
}, },
"is_encoding_problem": false,
"body": "päivää\n" "body": "päivää\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -82,17 +76,18 @@ Content-Type: text/plain; charset=utf-8
"charset": "utf-8" "charset": "utf-8"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": "yötä vaan.\n�\t�" "body": "yötä vaan.\n�\t�"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -101,11 +96,9 @@ Content-Type: text/plain; charset=utf-8
"charset": "utf-8" "charset": "utf-8"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": true,
"body": "?garbage" "body": "?garbage"
} }
} }
+48 -59
View File
@@ -33,8 +33,7 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg==
--1-- --1--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
@@ -49,22 +48,6 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg==
"Text": "1.0" "Text": "1.0"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
},
{
"name": {
"Rfc": "mime_version"
},
"start": 57,
"end": 62
}
],
"html_body": [ "html_body": [
0, 0,
1, 1,
@@ -79,10 +62,11 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg==
3, 3,
4 4
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -96,50 +80,36 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg==
"Text": "7bit" "Text": "7bit"
} }
}, },
"is_encoding_problem": false,
"body": "Move black king to queen's bishop\n" "body": "Move black king to queen's bishop\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "binary" "Text": "binary"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
} }
}, },
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n" "body": "Move ♚ to ♛'s ♝\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "8bit" "Text": "8bit"
} },
},
"body": "Move ♚ to ♛'s ♝\n"
}
},
{
"Text": {
"headers": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -148,17 +118,18 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg==
"charset": "UTF-8" "charset": "UTF-8"
} }
} }
}, }
},
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n"
}
},
{
"Text": {
"headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "quoted-printable" "Text": "quoted-printable"
} },
},
"body": "Move ♚ to ♛'s ♝\n"
}
},
{
"Text": {
"headers": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -167,11 +138,29 @@ TW92ZSDimZogdG8g4pmbJ3Mg4pmdCg==
"charset": "UTF-8" "charset": "UTF-8"
} }
} }
},
"content_transfer_encoding": {
"Text": "base64"
} }
}, },
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n"
}
},
{
"Text": {
"headers_rfc": {
"content_transfer_encoding": {
"Text": "base64"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
}
},
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n" "body": "Move ♚ to ♛'s ♝\n"
} }
} }
+34 -44
View File
@@ -39,12 +39,8 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
--1-- --1--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "multipart", "c_type": "multipart",
@@ -53,24 +49,11 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
"boundary": "1" "boundary": "1"
} }
} }
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "content_type"
},
"start": 13,
"end": 44
},
{
"name": {
"Rfc": "mime_version"
},
"start": 57,
"end": 62
}
],
"html_body": [ "html_body": [
0, 0,
1, 1,
@@ -87,10 +70,11 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
4, 4,
5 5
], ],
"attachments": [],
"parts": [ "parts": [
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "6bit" "Text": "6bit"
}, },
@@ -104,12 +88,13 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
} }
} }
}, },
"is_encoding_problem": false,
"body": "Move black king to queen's bishop\n" "body": "Move black king to queen's bishop\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "7bits" "Text": "7bits"
}, },
@@ -123,15 +108,33 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
} }
} }
}, },
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n" "body": "Move ♚ to ♛'s ♝\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
},
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "8 bit" "Text": "8 bit"
}, }
},
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n"
}
},
{
"Text": {
"headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -140,33 +143,18 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
"charset": "UTF-8" "charset": "UTF-8"
} }
} }
} },
},
"body": "Move ♚ to ♛'s ♝\n"
}
},
{
"Text": {
"headers": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "7-bit" "Text": "7-bit"
},
"content_type": {
"ContentType": {
"c_type": "text",
"c_subtype": "plain",
"attributes": {
"charset": "UTF-8"
}
}
} }
}, },
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n" "body": "Move ♚ to ♛'s ♝\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": { "content_transfer_encoding": {
"Text": "8-bit" "Text": "8-bit"
}, },
@@ -180,12 +168,13 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
} }
} }
}, },
"is_encoding_problem": false,
"body": "Move ♚ to ♛'s ♝\n" "body": "Move ♚ to ♛'s ♝\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -196,6 +185,7 @@ Move =E2=99=9A to =E2=99=9B's =E2=99=9D
} }
} }
}, },
"is_encoding_problem": false,
"body": "Move =E2=99=9A to =E2=99=9B's =E2=99=9D\n" "body": "Move =E2=99=9A to =E2=99=9B's =E2=99=9D\n"
} }
} }
BIN
View File
Binary file not shown.
+33 -49
View File
@@ -28,12 +28,8 @@ Signed by undersigned
--2-- --2--
--1-- --1--
---- EXPECTED STRUCTURE ---- ---- EXPECTED STRUCTURE ----{
{
"headers_rfc": { "headers_rfc": {
"mime_version": {
"Text": "1.0"
},
"subject": { "subject": {
"Text": "Hide and seek" "Text": "Hide and seek"
}, },
@@ -45,31 +41,11 @@ Signed by undersigned
"boundary": "1" "boundary": "1"
} }
} }
},
"mime_version": {
"Text": "1.0"
} }
}, },
"headers_offsets": [
{
"name": {
"Rfc": "subject"
},
"start": 8,
"end": 23
},
{
"name": {
"Rfc": "mime_version"
},
"start": 36,
"end": 41
},
{
"name": {
"Rfc": "content_type"
},
"start": 54,
"end": 83
}
],
"html_body": [ "html_body": [
2 2
], ],
@@ -82,14 +58,16 @@ Signed by undersigned
"parts": [ "parts": [
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "signed", "c_type": "multipart",
"attributes": { "c_subtype": "signed",
"migalc": "pen+paper", "attributes": {
"boundary": "2", "migalc": "pen+paper",
"protocol": "signature/plain" "protocol": "signature/plain",
"boundary": "2"
}
} }
} }
} }
@@ -97,12 +75,14 @@ Signed by undersigned
}, },
{ {
"Multipart": { "Multipart": {
"content_type": { "headers_rfc": {
"ContentType": { "content_type": {
"c_type": "multipart", "ContentType": {
"c_subtype": "alternative", "c_type": "multipart",
"attributes": { "c_subtype": "alternative",
"boundary": "3" "attributes": {
"boundary": "3"
}
} }
} }
} }
@@ -110,7 +90,7 @@ Signed by undersigned
}, },
{ {
"Html": { "Html": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
@@ -121,28 +101,31 @@ Signed by undersigned
} }
} }
}, },
"is_encoding_problem": false,
"body": "<html><head><title>Search me</title></head><body><p>Don't find me here</p></body></html>\n" "body": "<html><head><title>Search me</title></head><body><p>Don't find me here</p></body></html>\n"
} }
}, },
{ {
"Text": { "Text": {
"headers": { "headers_rfc": {
"content_transfer_encoding": {
"Text": "binary"
},
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "text", "c_type": "text",
"c_subtype": "plain" "c_subtype": "plain",
"attributes": null
} }
},
"content_transfer_encoding": {
"Text": "binary"
} }
}, },
"is_encoding_problem": false,
"body": "Search me, and Find me here" "body": "Search me, and Find me here"
} }
}, },
{ {
"Binary": { "Binary": {
"headers": { "headers_rfc": {
"content_type": { "content_type": {
"ContentType": { "ContentType": {
"c_type": "signature", "c_type": "signature",
@@ -153,6 +136,7 @@ Signed by undersigned
} }
} }
}, },
"is_encoding_problem": false,
"body": [ "body": [
83, 83,
105, 105,

Some files were not shown because too many files have changed in this diff Show More