mirror of
https://github.com/stalwartlabs/mail-parser.git
synced 2026-11-30 00:01:25 +00:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
f820cee04a | ||
|
|
ea23e474d3 | ||
|
|
3c14e77932 | ||
|
|
6b0f8052ee | ||
|
|
bfaeeeb886 | ||
|
|
514f989e7e | ||
|
|
bcf182bbc1 | ||
|
|
78c4cd424f | ||
|
|
4835ccfb9e | ||
|
|
c52670cf1f | ||
|
|
96d8123b74 |
@@ -0,0 +1,33 @@
|
|||||||
|
|
||||||
|
mail-parser 0.3
|
||||||
|
================================
|
||||||
|
- Improved API, now `Message::parse` returns `Option<Message>` to indicate when parsing was successful.
|
||||||
|
- Headers are now stored internally in a `HashMap` instead of `struct` fields.
|
||||||
|
- Added support for new RFCs:
|
||||||
|
- [RFC 2557 - MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://datatracker.ietf.org/doc/html/rfc2557)
|
||||||
|
- [RFC 2392 - Content-ID and Message-ID Uniform Resource Locators](https://datatracker.ietf.org/doc/html/rfc2392)
|
||||||
|
- [RFC 3282 - Content Language Headers](https://datatracker.ietf.org/doc/html/rfc3282)
|
||||||
|
- [RFC 3339 - Date and Time on the Internet: Timestamps](https://datatracker.ietf.org/doc/html/rfc3339)
|
||||||
|
|
||||||
|
mail-parser 0.2.1
|
||||||
|
================================
|
||||||
|
- Performance enhacements, now *mail-parser* is almost as fast as the `unsafe` 0.1 version.
|
||||||
|
|
||||||
|
mail-parser 0.2
|
||||||
|
================================
|
||||||
|
- Re-factoring to use **100% safe** Rust after a [discussion on Reddit](https://www.reddit.com/r/rust/comments/qkc5rk/fast_and_robust_email_parsing_library_for_rust/).
|
||||||
|
- Added `Message::is_empty`.
|
||||||
|
|
||||||
|
mail-parser 0.1.1
|
||||||
|
================================
|
||||||
|
- Bug-fixing after **fuzzing** the library.
|
||||||
|
|
||||||
|
mail-parser 0.1
|
||||||
|
================================
|
||||||
|
- Initial release with plenty of `unsafe` code to speed things up.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Generated
+1
-1
@@ -59,7 +59,7 @@ checksum = "7fb9b38af92608140b86b693604b9ffcc5824240a484d1ecd4795bacb2fe88f3"
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mail-parser"
|
name = "mail-parser"
|
||||||
version = "0.2.0"
|
version = "0.3.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
+6
-6
@@ -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.2.0"
|
version = "0.3.0"
|
||||||
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"
|
||||||
@@ -12,13 +12,13 @@ categories = ["email", "parser-implementations"]
|
|||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
encoding_rs = {version=">=0.8.28", optional=true}
|
encoding_rs = {version="0.8", optional=true}
|
||||||
serde = { version = ">=1.0.117", features = ["derive"], optional=true}
|
serde = { version = "1.0", features = ["derive"], optional=true}
|
||||||
serde_bytes = { version = ">=0.11.5", optional=true}
|
serde_bytes = { version = "0.11", optional=true}
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
serde_yaml = ">=0.8.21"
|
serde_yaml = "0.8"
|
||||||
serde_json = ">=1.0.59"
|
serde_json = "1.0"
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = ["serde_support", "full_encoding"]
|
default = ["serde_support", "full_encoding"]
|
||||||
|
|||||||
@@ -7,7 +7,7 @@
|
|||||||
[](https://twitter.com/stalwartlabs)
|
[](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 other [internet messaging RFCs](#conformed-rfcs).
|
Multipurpose Internet Mail Extensions (MIME; _RFC 2045 - 2049_) as well as many other [internet messaging RFCs](#conformed-rfcs).
|
||||||
|
|
||||||
It also supports decoding messages in [41 different character sets](#supported-character-sets) including obsolete formats such as UTF-7.
|
It also supports decoding messages in [41 different character sets](#supported-character-sets) including obsolete formats such as UTF-7.
|
||||||
All Unicode (UTF-*) and single-byte character sets are handled internally by the library while support for legacy multi-byte encodings of Chinese
|
All Unicode (UTF-*) and single-byte character sets are handled internally by the library while support for legacy multi-byte encodings of Chinese
|
||||||
@@ -24,9 +24,9 @@ HTML and plain text inline body parts is done automatically when the _alternativ
|
|||||||
|
|
||||||
Performance and memory safety were two important factors while designing _mail-parser_:
|
Performance and memory safety were two important factors while designing _mail-parser_:
|
||||||
|
|
||||||
- **Zero-copy parsing**: Practically all strings returned by this library are `Cow<str>` references to the input raw message.
|
- **Zero-copy**: Practically all strings returned by this library are `Cow<str>` references to the input raw message.
|
||||||
- **High performance Base64 decoding** based on Chromium's decoder ([the fastest non-SIMD decoder](https://github.com/lemire/fastbase64)).
|
- **High performance Base64 decoding** based on Chromium's decoder ([the fastest non-SIMD decoder](https://github.com/lemire/fastbase64)).
|
||||||
- **Fast** parsing of message header fields, character set names and HTML entities using [perfect hashing](https://en.wikipedia.org/wiki/Perfect_hash_function).
|
- **Fast parsing** of message header fields, character set names and HTML entities using [perfect hashing](https://en.wikipedia.org/wiki/Perfect_hash_function).
|
||||||
- Written in **100% safe** Rust with no external dependencies.
|
- Written in **100% safe** Rust with no external dependencies.
|
||||||
- Every function in the library has been [fuzzed](#testing-fuzzing--benchmarking) and
|
- Every function in the library has been [fuzzed](#testing-fuzzing--benchmarking) and
|
||||||
meticulously [tested with MIRI](#testing-fuzzing--benchmarking).
|
meticulously [tested with MIRI](#testing-fuzzing--benchmarking).
|
||||||
@@ -72,19 +72,19 @@ Performance and memory safety were two important factors while designing _mail-p
|
|||||||
)
|
)
|
||||||
.as_bytes();
|
.as_bytes();
|
||||||
|
|
||||||
let message = Message::parse(input);
|
let message = Message::parse(input).unwrap();
|
||||||
|
|
||||||
// Parses addresses (including comments), lists and groups
|
// Parses addresses (including comments), lists and groups
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_from(),
|
message.get_from(),
|
||||||
&Address::Address(Addr {
|
&HeaderValue::Address(Addr {
|
||||||
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
||||||
address: Some("art@vandelay.com".into())
|
address: Some("art@vandelay.com".into())
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_to(),
|
message.get_to(),
|
||||||
&Address::GroupList(vec
|
- [RFC 2048 - Multipurpose Internet Mail Extensions (MIME) Part Four: Registration Procedures](https://datatracker.ietf.org/doc/html/rfc2048)
|
||||||
- [RFC 2049 - Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples](https://datatracker.ietf.org/doc/html/rfc2049)
|
- [RFC 2049 - Multipurpose Internet Mail Extensions (MIME) Part Five: Conformance Criteria and Examples](https://datatracker.ietf.org/doc/html/rfc2049)
|
||||||
- [RFC 2231 - MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations](https://datatracker.ietf.org/doc/html/rfc2231)
|
- [RFC 2231 - MIME Parameter Value and Encoded Word Extensions: Character Sets, Languages, and Continuations](https://datatracker.ietf.org/doc/html/rfc2231)
|
||||||
|
- [RFC 2557 - MIME Encapsulation of Aggregate Documents, such as HTML (MHTML)](https://datatracker.ietf.org/doc/html/rfc2557)
|
||||||
- [RFC 2183 - Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field](https://datatracker.ietf.org/doc/html/rfc2183)
|
- [RFC 2183 - Communicating Presentation Information in Internet Messages: The Content-Disposition Header Field](https://datatracker.ietf.org/doc/html/rfc2183)
|
||||||
|
- [RFC 2392 - Content-ID and Message-ID Uniform Resource Locators](https://datatracker.ietf.org/doc/html/rfc2392)
|
||||||
|
- [RFC 3282 - Content Language Headers](https://datatracker.ietf.org/doc/html/rfc3282)
|
||||||
- [RFC 6532 - Internationalized Email Headers](https://datatracker.ietf.org/doc/html/rfc6532)
|
- [RFC 6532 - Internationalized Email Headers](https://datatracker.ietf.org/doc/html/rfc6532)
|
||||||
- [RFC 2152 - UTF-7 - A Mail-Safe Transformation Format of Unicode](https://datatracker.ietf.org/doc/html/rfc2152)
|
- [RFC 2152 - UTF-7 - A Mail-Safe Transformation Format of Unicode](https://datatracker.ietf.org/doc/html/rfc2152)
|
||||||
- [RFC 2369 - The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields](https://datatracker.ietf.org/doc/html/rfc2369)
|
- [RFC 2369 - The Use of URLs as Meta-Syntax for Core Mail List Commands and their Transport through Message Header Fields](https://datatracker.ietf.org/doc/html/rfc2369)
|
||||||
- [RFC 2919 - List-Id: A Structured Field and Namespace for the Identification of Mailing Lists](https://datatracker.ietf.org/doc/html/rfc2919)
|
- [RFC 2919 - List-Id: A Structured Field and Namespace for the Identification of Mailing Lists](https://datatracker.ietf.org/doc/html/rfc2919)
|
||||||
|
- [RFC 3339 - Date and Time on the Internet: Timestamps](https://datatracker.ietf.org/doc/html/rfc3339)
|
||||||
- [RFC 8621 - The JSON Meta Application Protocol (JMAP) for Mail (Section 4.1.4)](https://datatracker.ietf.org/doc/html/rfc8621#section-4.1.4)
|
- [RFC 8621 - The JSON Meta Application Protocol (JMAP) for Mail (Section 4.1.4)](https://datatracker.ietf.org/doc/html/rfc8621#section-4.1.4)
|
||||||
|
|
||||||
## Supported Character Sets
|
## Supported Character Sets
|
||||||
|
|||||||
@@ -1,4 +1,15 @@
|
|||||||
use mail_parser::{Addr, Address, BodyPart, Group, Message, MessagePart, MimeFieldGet};
|
/*
|
||||||
|
* 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::*;
|
||||||
|
|
||||||
fn main() {
|
fn main() {
|
||||||
let input = concat!(
|
let input = concat!(
|
||||||
@@ -38,19 +49,19 @@ fn main() {
|
|||||||
)
|
)
|
||||||
.as_bytes();
|
.as_bytes();
|
||||||
|
|
||||||
let message = Message::parse(input);
|
let message = Message::parse(input).unwrap();
|
||||||
|
|
||||||
// Parses addresses (including comments), lists and groups
|
// Parses addresses (including comments), lists and groups
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_from(),
|
message.get_from(),
|
||||||
&Address::Address(Addr {
|
&HeaderValue::Address(Addr {
|
||||||
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
||||||
address: Some("art@vandelay.com".into())
|
address: Some("art@vandelay.com".into())
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_to(),
|
message.get_to(),
|
||||||
&Address::GroupList(vec![
|
&HeaderValue::GroupList(vec![
|
||||||
Group {
|
Group {
|
||||||
name: Some("Colleagues".into()),
|
name: Some("Colleagues".into()),
|
||||||
addresses: vec![Addr {
|
addresses: vec![Addr {
|
||||||
@@ -135,8 +146,6 @@ fn main() {
|
|||||||
// Full RFC2231 support for continuations and character sets
|
// Full RFC2231 support for continuations and character sets
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_attachment
|
nested_attachment
|
||||||
.get_header()
|
|
||||||
.unwrap()
|
|
||||||
.get_content_type()
|
.get_content_type()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get_attribute("name")
|
.get_attribute("name")
|
||||||
|
|||||||
Generated
+1
-1
@@ -42,7 +42,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "mail-parser"
|
name = "mail-parser"
|
||||||
version = "0.1.1"
|
version = "0.2.1"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"encoding_rs",
|
"encoding_rs",
|
||||||
"serde",
|
"serde",
|
||||||
|
|||||||
@@ -3,16 +3,16 @@ use libfuzzer_sys::fuzz_target;
|
|||||||
|
|
||||||
use mail_parser::{
|
use mail_parser::{
|
||||||
decoders::{
|
decoders::{
|
||||||
base64::Base64Decoder,
|
base64::decode_base64,
|
||||||
charsets::{
|
charsets::{
|
||||||
map::get_charset_decoder,
|
map::get_charset_decoder,
|
||||||
single_byte::decoder_iso_8859_1,
|
single_byte::decoder_iso_8859_1,
|
||||||
utf::{decoder_utf16, decoder_utf16_be, decoder_utf16_le, decoder_utf7},
|
utf::{decoder_utf16, decoder_utf16_be, decoder_utf16_le, decoder_utf7},
|
||||||
},
|
},
|
||||||
encoded_word::parse_encoded_word,
|
encoded_word::decode_rfc2047,
|
||||||
hex::decode_hex,
|
hex::decode_hex,
|
||||||
html::{add_html_token, html_to_text, text_to_html},
|
html::{add_html_token, html_to_text, text_to_html},
|
||||||
quoted_printable::QuotedPrintableDecoder,
|
quoted_printable::decode_quoted_printable,
|
||||||
},
|
},
|
||||||
parsers::{
|
parsers::{
|
||||||
fields::{
|
fields::{
|
||||||
@@ -24,8 +24,9 @@ use mail_parser::{
|
|||||||
raw::{parse_and_ignore, parse_raw},
|
raw::{parse_and_ignore, parse_raw},
|
||||||
unstructured::parse_unstructured,
|
unstructured::parse_unstructured,
|
||||||
},
|
},
|
||||||
|
mime::*,
|
||||||
header::parse_header_name,
|
header::parse_header_name,
|
||||||
message_stream::MessageStream,
|
message::MessageStream,
|
||||||
},
|
},
|
||||||
Message,
|
Message,
|
||||||
};
|
};
|
||||||
@@ -33,80 +34,80 @@ use mail_parser::{
|
|||||||
fuzz_target!(|data: &[u8]| {
|
fuzz_target!(|data: &[u8]| {
|
||||||
// Fuzz every parsing function
|
// Fuzz every parsing function
|
||||||
for n_fuzz in 1..=24 {
|
for n_fuzz in 1..=24 {
|
||||||
let stream = MessageStream::new(&data);
|
let mut stream = MessageStream::new(&data);
|
||||||
|
|
||||||
match n_fuzz {
|
match n_fuzz {
|
||||||
1 => {
|
1 => {
|
||||||
parse_date(&stream, false);
|
parse_date(&mut stream);
|
||||||
}
|
}
|
||||||
2 => {
|
2 => {
|
||||||
parse_address(&stream);
|
parse_address(&mut stream);
|
||||||
}
|
}
|
||||||
3 => {
|
3 => {
|
||||||
parse_id(&stream);
|
parse_id(&mut stream);
|
||||||
}
|
}
|
||||||
4 => {
|
4 => {
|
||||||
parse_comma_separared(&stream);
|
parse_comma_separared(&mut stream);
|
||||||
}
|
}
|
||||||
5 => {
|
5 => {
|
||||||
parse_and_ignore(&stream);
|
parse_and_ignore(&mut stream);
|
||||||
}
|
}
|
||||||
6 => {
|
6 => {
|
||||||
parse_raw(&stream);
|
parse_raw(&mut stream);
|
||||||
}
|
}
|
||||||
7 => {
|
7 => {
|
||||||
parse_unstructured(&stream);
|
parse_unstructured(&mut stream);
|
||||||
}
|
}
|
||||||
8 => {
|
8 => {
|
||||||
parse_content_type(&stream);
|
parse_content_type(&mut stream);
|
||||||
}
|
}
|
||||||
9 => {
|
9 => {
|
||||||
parse_header_name(&stream);
|
parse_header_name(&mut stream);
|
||||||
}
|
}
|
||||||
10 => {
|
10 => {
|
||||||
parse_encoded_word(&stream);
|
decode_rfc2047(&mut stream, 0);
|
||||||
}
|
}
|
||||||
11 => {
|
11 => {
|
||||||
stream.seek_next_part(b"\n");
|
seek_next_part(&mut stream, b"\n");
|
||||||
}
|
}
|
||||||
12 => {
|
12 => {
|
||||||
stream.get_bytes_to_boundary(b"\n");
|
get_bytes_to_boundary(&mut stream, 0, b"\n", false);
|
||||||
}
|
}
|
||||||
13 => {
|
13 => {
|
||||||
stream.get_bytes_to_boundary(&[]);
|
get_bytes_to_boundary(&mut stream, 0, &[], false);
|
||||||
}
|
}
|
||||||
14 => {
|
14 => {
|
||||||
stream.skip_crlf();
|
skip_crlf(&mut stream);
|
||||||
}
|
}
|
||||||
15 => {
|
15 => {
|
||||||
stream.is_boundary_end(0);
|
is_boundary_end(&mut stream, 0);
|
||||||
}
|
}
|
||||||
16 => {
|
16 => {
|
||||||
stream.skip_multipart_end();
|
skip_multipart_end(&mut stream);
|
||||||
}
|
}
|
||||||
17 => {
|
17 => {
|
||||||
stream.decode_base64(b"\n", true);
|
decode_base64(&mut stream, 0, b"\n", true);
|
||||||
}
|
}
|
||||||
18 => {
|
18 => {
|
||||||
stream.decode_base64(b"\n", false);
|
decode_base64(&mut stream, 0, b"\n", false);
|
||||||
}
|
}
|
||||||
19 => {
|
19 => {
|
||||||
stream.decode_base64(&[], true);
|
decode_base64(&mut stream, 0, &[], true);
|
||||||
}
|
}
|
||||||
20 => {
|
20 => {
|
||||||
stream.decode_base64(&[], false);
|
decode_base64(&mut stream, 0, &[], false);
|
||||||
}
|
}
|
||||||
21 => {
|
21 => {
|
||||||
stream.decode_quoted_printable(b"\n\n", true); // QP Boundaries have to be at least 2 bytes long
|
decode_quoted_printable(&mut stream, 0, b"\n\n", true); // QP Boundaries have to be at least 2 bytes long
|
||||||
}
|
}
|
||||||
22 => {
|
22 => {
|
||||||
stream.decode_quoted_printable(b"\n\n", false); // QP Boundaries have to be at least 2 bytes long
|
decode_quoted_printable(&mut stream, 0, b"\n\n", false); // QP Boundaries have to be at least 2 bytes long
|
||||||
}
|
}
|
||||||
23 => {
|
23 => {
|
||||||
stream.decode_quoted_printable(&[], true);
|
decode_quoted_printable(&mut stream, 0, &[], true);
|
||||||
}
|
}
|
||||||
24 => {
|
24 => {
|
||||||
stream.decode_quoted_printable(&[], false);
|
decode_quoted_printable(&mut stream, 0, &[], false);
|
||||||
}
|
}
|
||||||
0 | 25..=u32::MAX => unreachable!(),
|
0 | 25..=u32::MAX => unreachable!(),
|
||||||
}
|
}
|
||||||
|
|||||||
+93
-87
@@ -9,111 +9,108 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use crate::parsers::message::MessageStream;
|
||||||
|
|
||||||
use crate::parsers::message_stream::MessageStream;
|
use super::DecodeResult;
|
||||||
|
|
||||||
pub trait Base64Decoder<'x> {
|
pub fn decode_base64<'x>(
|
||||||
fn decode_base64(&self, boundary: &[u8], is_word: bool) -> (bool, Option<Cow<'x, [u8]>>);
|
stream: &MessageStream<'x>,
|
||||||
}
|
start_pos: usize,
|
||||||
|
boundary: &[u8],
|
||||||
|
is_word: bool,
|
||||||
|
) -> (usize, DecodeResult) {
|
||||||
|
let mut success = boundary.is_empty();
|
||||||
|
|
||||||
impl<'x> Base64Decoder<'x> for MessageStream<'x> {
|
let mut chunk: u32 = 0;
|
||||||
fn decode_base64(&self, boundary: &[u8], is_word: bool) -> (bool, Option<Cow<'x, [u8]>>) {
|
let mut byte_count: u8 = 0;
|
||||||
let mut success = boundary.is_empty();
|
let mut match_count: usize = 0;
|
||||||
|
|
||||||
let mut chunk: u32 = 0;
|
let mut bytes_read = 0;
|
||||||
let mut byte_count: u8 = 0;
|
|
||||||
let mut match_count: usize = 0;
|
|
||||||
|
|
||||||
let start_pos = self.pos.get();
|
let mut buf = Vec::with_capacity(stream.data.len() - start_pos);
|
||||||
let mut read_pos = start_pos;
|
|
||||||
|
|
||||||
let mut buf = Vec::with_capacity(self.data.len() - read_pos);
|
for ch in stream.data[start_pos..].iter() {
|
||||||
|
bytes_read += 1;
|
||||||
|
|
||||||
for ch in self.data[read_pos..].iter() {
|
if !success {
|
||||||
read_pos += 1;
|
if *ch == boundary[match_count] {
|
||||||
|
match_count += 1;
|
||||||
if !success {
|
if match_count == boundary.len() {
|
||||||
if *ch == boundary[match_count] {
|
success = true;
|
||||||
match_count += 1;
|
|
||||||
if match_count == boundary.len() {
|
|
||||||
success = true;
|
|
||||||
break;
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else if match_count > 0 {
|
|
||||||
if *ch == boundary[0] {
|
|
||||||
match_count = 1;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
match_count = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let val = BASE64_MAP[byte_count as usize][*ch as usize];
|
|
||||||
|
|
||||||
if val >= 0x01ffffff {
|
|
||||||
if *ch == b'=' {
|
|
||||||
match byte_count {
|
|
||||||
1 | 2 => {
|
|
||||||
buf.push(chunk.to_le_bytes()[0]);
|
|
||||||
|
|
||||||
byte_count = 0;
|
|
||||||
}
|
|
||||||
3 => {
|
|
||||||
buf.extend_from_slice(&chunk.to_le_bytes()[0..2]);
|
|
||||||
byte_count = 0;
|
|
||||||
}
|
|
||||||
0 => (),
|
|
||||||
_ => {
|
|
||||||
success = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
} else if !ch.is_ascii_whitespace() || is_word {
|
|
||||||
success = false;
|
|
||||||
break;
|
break;
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
continue;
|
} else if match_count > 0 {
|
||||||
}
|
if *ch == boundary[0] {
|
||||||
|
match_count = 1;
|
||||||
byte_count = (byte_count + 1) & 3;
|
continue;
|
||||||
|
} else {
|
||||||
if byte_count == 1 {
|
match_count = 0;
|
||||||
chunk = val;
|
|
||||||
} else {
|
|
||||||
chunk |= val;
|
|
||||||
|
|
||||||
if byte_count == 0 {
|
|
||||||
buf.extend_from_slice(&chunk.to_le_bytes()[0..3]);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.pos.set(read_pos);
|
let val = BASE64_MAP[byte_count as usize][*ch as usize];
|
||||||
|
|
||||||
(
|
if val >= 0x01ffffff {
|
||||||
success,
|
if *ch == b'=' {
|
||||||
if !buf.is_empty() {
|
match byte_count {
|
||||||
buf.shrink_to_fit();
|
1 | 2 => {
|
||||||
Some(buf.into())
|
buf.push(chunk.to_le_bytes()[0]);
|
||||||
} else {
|
|
||||||
None
|
byte_count = 0;
|
||||||
},
|
}
|
||||||
)
|
3 => {
|
||||||
|
buf.extend_from_slice(&chunk.to_le_bytes()[0..2]);
|
||||||
|
byte_count = 0;
|
||||||
|
}
|
||||||
|
0 => (),
|
||||||
|
_ => {
|
||||||
|
success = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else if !ch.is_ascii_whitespace() || is_word {
|
||||||
|
success = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
|
||||||
|
byte_count = (byte_count + 1) & 3;
|
||||||
|
|
||||||
|
if byte_count == 1 {
|
||||||
|
chunk = val;
|
||||||
|
} else {
|
||||||
|
chunk |= val;
|
||||||
|
|
||||||
|
if byte_count == 0 {
|
||||||
|
buf.extend_from_slice(&chunk.to_le_bytes()[0..3]);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(
|
||||||
|
if success { bytes_read } else { 0 },
|
||||||
|
if !buf.is_empty() {
|
||||||
|
buf.shrink_to_fit();
|
||||||
|
DecodeResult::Owned(buf)
|
||||||
|
} else {
|
||||||
|
DecodeResult::Empty
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::message_stream::MessageStream;
|
use crate::{
|
||||||
|
decoders::{base64::decode_base64, DecodeResult},
|
||||||
use super::Base64Decoder;
|
parsers::message::MessageStream,
|
||||||
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn decode_base64() {
|
fn decode_base64_strings() {
|
||||||
let inputs = [
|
let inputs = [
|
||||||
("VGVzdA==", "Test", "", true),
|
("VGVzdA==", "Test", "", true),
|
||||||
("WWU=", "Ye", "", true),
|
("WWU=", "Ye", "", true),
|
||||||
@@ -169,11 +166,20 @@ mod tests {
|
|||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
let stream = MessageStream::new(str.as_bytes());
|
let stream = MessageStream::new(str.as_bytes());
|
||||||
|
|
||||||
let (success, result) = stream.decode_base64(input.2.as_bytes(), input.3);
|
let (bytes_read, result) = decode_base64(&stream, 0, input.2.as_bytes(), input.3);
|
||||||
assert_eq!(success, !input.1.is_empty(), "Failed for '{:?}'", input.0);
|
assert_eq!(
|
||||||
|
bytes_read > 0,
|
||||||
|
!input.1.is_empty(),
|
||||||
|
"Failed for '{:?}'",
|
||||||
|
input.0
|
||||||
|
);
|
||||||
|
|
||||||
if !input.1.is_empty() {
|
if !input.1.is_empty() {
|
||||||
let result_str = std::str::from_utf8(result.as_ref().unwrap().as_ref()).unwrap();
|
let bytes = match result {
|
||||||
|
DecodeResult::Owned(v) => v,
|
||||||
|
_ => unreachable!(),
|
||||||
|
};
|
||||||
|
let result_str = std::str::from_utf8(&bytes).unwrap();
|
||||||
//println!("'{}' -> '{}'", input.0.escape_debug(), result_str.escape_debug());
|
//println!("'{}' -> '{}'", input.0.escape_debug(), result_str.escape_debug());
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
result_str,
|
result_str,
|
||||||
|
|||||||
@@ -9,80 +9,106 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use crate::{
|
use crate::{decoders::charsets::map::get_charset_decoder, parsers::message::MessageStream};
|
||||||
decoders::{
|
|
||||||
base64::Base64Decoder, charsets::map::get_charset_decoder,
|
use super::{
|
||||||
quoted_printable::QuotedPrintableDecoder,
|
base64::decode_base64, quoted_printable::decode_quoted_printable, DecodeFnc, DecodeResult,
|
||||||
},
|
|
||||||
parsers::message_stream::MessageStream,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
pub fn parse_encoded_word(stream: &MessageStream) -> Option<String> {
|
enum Rfc2047State {
|
||||||
if !stream.skip_byte(&b'?') {
|
Init,
|
||||||
return None;
|
Charset,
|
||||||
}
|
Encoding,
|
||||||
let charset_start = stream.get_pos();
|
Data,
|
||||||
let mut charset_end = charset_start;
|
}
|
||||||
let backup_pos = charset_start - 1;
|
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
pub fn decode_rfc2047(stream: &MessageStream, start_pos: usize) -> (usize, Option<String>) {
|
||||||
match ch {
|
let mut read_pos: usize = start_pos;
|
||||||
b'?' => {
|
let mut state = Rfc2047State::Init;
|
||||||
if charset_end == charset_start {
|
|
||||||
charset_end = stream.get_pos() - 1;
|
let mut charset_start = 0;
|
||||||
|
let mut charset_end = 0;
|
||||||
|
let mut decode_fnc: Option<DecodeFnc> = None;
|
||||||
|
|
||||||
|
for ch in stream.data[start_pos..].iter() {
|
||||||
|
read_pos += 1;
|
||||||
|
|
||||||
|
match state {
|
||||||
|
Rfc2047State::Init => {
|
||||||
|
if ch != &b'?' {
|
||||||
|
return (0, None);
|
||||||
}
|
}
|
||||||
break;
|
state = Rfc2047State::Charset;
|
||||||
|
charset_start = read_pos;
|
||||||
|
charset_end = read_pos;
|
||||||
}
|
}
|
||||||
b'*' => {
|
Rfc2047State::Charset => match ch {
|
||||||
if charset_end == charset_start {
|
b'?' => {
|
||||||
charset_end = stream.get_pos() - 1;
|
if charset_end == charset_start {
|
||||||
|
charset_end = read_pos - 1;
|
||||||
|
}
|
||||||
|
if (charset_end - charset_start) < 2 {
|
||||||
|
return (0, None);
|
||||||
|
}
|
||||||
|
state = Rfc2047State::Encoding;
|
||||||
|
}
|
||||||
|
b'*' => {
|
||||||
|
if charset_end == charset_start {
|
||||||
|
charset_end = read_pos - 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
b'\n' => {
|
||||||
|
return (0, None);
|
||||||
|
}
|
||||||
|
_ => (),
|
||||||
|
},
|
||||||
|
Rfc2047State::Encoding => {
|
||||||
|
match ch {
|
||||||
|
b'q' | b'Q' => decode_fnc = Some(decode_quoted_printable),
|
||||||
|
b'b' | b'B' => decode_fnc = Some(decode_base64),
|
||||||
|
_ => {
|
||||||
|
return (0, None);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
state = Rfc2047State::Data;
|
||||||
|
}
|
||||||
|
Rfc2047State::Data => {
|
||||||
|
if ch != &b'?' {
|
||||||
|
return (0, None);
|
||||||
|
} else {
|
||||||
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b'\n' => {
|
|
||||||
stream.set_pos(backup_pos);
|
|
||||||
return None;
|
|
||||||
}
|
|
||||||
_ => (),
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if !(2..=45).contains(&(charset_end - charset_start)) {
|
if let Some(decode_fnc) = decode_fnc {
|
||||||
stream.set_pos(backup_pos);
|
if let (bytes_read @ 1..=usize::MAX, DecodeResult::Owned(bytes)) =
|
||||||
return None;
|
decode_fnc(stream, read_pos, b"?=", true)
|
||||||
}
|
{
|
||||||
|
return (
|
||||||
let (success, bytes) = match stream.next() {
|
(read_pos - start_pos) + bytes_read,
|
||||||
Some(b'q') | Some(b'Q') if stream.skip_byte(&b'?') => {
|
if let Some(decoder) = get_charset_decoder(&stream.data[charset_start..charset_end])
|
||||||
stream.decode_quoted_printable(b"?=", true)
|
{
|
||||||
|
decoder(&bytes).into()
|
||||||
|
} else {
|
||||||
|
String::from_utf8(bytes)
|
||||||
|
.unwrap_or_else(|e| String::from_utf8_lossy(e.as_bytes()).into_owned())
|
||||||
|
.into()
|
||||||
|
},
|
||||||
|
);
|
||||||
}
|
}
|
||||||
Some(b'b') | Some(b'B') if stream.skip_byte(&b'?') => stream.decode_base64(b"?=", true),
|
|
||||||
_ => (false, None),
|
|
||||||
};
|
|
||||||
|
|
||||||
if !success {
|
|
||||||
stream.set_pos(backup_pos);
|
|
||||||
return None;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if let Some(decoder) =
|
(0, None)
|
||||||
get_charset_decoder(stream.get_bytes(charset_start, charset_end).unwrap())
|
|
||||||
{
|
|
||||||
decoder(bytes?.as_ref()).into()
|
|
||||||
} else {
|
|
||||||
String::from_utf8(bytes?.into_owned())
|
|
||||||
.unwrap_or_else(|e| String::from_utf8_lossy(e.as_bytes()).into_owned())
|
|
||||||
.into()
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::{
|
use crate::{decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream};
|
||||||
decoders::encoded_word::parse_encoded_word, parsers::message_stream::MessageStream,
|
|
||||||
};
|
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn decode_rfc2047() {
|
fn decode_rfc2047_string() {
|
||||||
let inputs = [
|
let inputs = [
|
||||||
(
|
(
|
||||||
"?iso-8859-1?q?this=20is=20some=20text?=".to_string(),
|
"?iso-8859-1?q?this=20is=20some=20text?=".to_string(),
|
||||||
@@ -163,12 +189,12 @@ mod tests {
|
|||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
|
|
||||||
match parse_encoded_word(&MessageStream::new(str.as_bytes())) {
|
match decode_rfc2047(&MessageStream::new(str.as_bytes()), 0) {
|
||||||
Some(string) => {
|
(_, Some(string)) => {
|
||||||
//println!("Decoded '{}'", string);
|
//println!("Decoded '{}'", string);
|
||||||
assert_eq!(string, input.1);
|
assert_eq!(string, input.1);
|
||||||
}
|
}
|
||||||
None => panic!("Failed to decode '{}'", input.0),
|
_ => panic!("Failed to decode '{}'", input.0),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,9 +9,19 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
use crate::parsers::message::MessageStream;
|
||||||
|
|
||||||
pub mod base64;
|
pub mod base64;
|
||||||
pub mod charsets;
|
pub mod charsets;
|
||||||
pub mod encoded_word;
|
pub mod encoded_word;
|
||||||
pub mod hex;
|
pub mod hex;
|
||||||
pub mod html;
|
pub mod html;
|
||||||
pub mod quoted_printable;
|
pub mod quoted_printable;
|
||||||
|
|
||||||
|
pub type DecodeFnc<'x> = fn(&MessageStream<'x>, usize, &[u8], bool) -> (usize, DecodeResult);
|
||||||
|
|
||||||
|
pub enum DecodeResult {
|
||||||
|
Owned(Vec<u8>),
|
||||||
|
Borrowed((usize, usize)),
|
||||||
|
Empty,
|
||||||
|
}
|
||||||
|
|||||||
+134
-134
@@ -9,9 +9,9 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use crate::parsers::message::MessageStream;
|
||||||
|
|
||||||
use crate::parsers::message_stream::MessageStream;
|
use super::DecodeResult;
|
||||||
|
|
||||||
#[derive(PartialEq, Debug)]
|
#[derive(PartialEq, Debug)]
|
||||||
enum QuotedPrintableState {
|
enum QuotedPrintableState {
|
||||||
@@ -20,162 +20,152 @@ enum QuotedPrintableState {
|
|||||||
Hex1,
|
Hex1,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub trait QuotedPrintableDecoder<'x> {
|
pub fn decode_quoted_printable<'x>(
|
||||||
fn decode_quoted_printable(
|
stream: &MessageStream<'x>,
|
||||||
&self,
|
start_pos: usize,
|
||||||
boundary: &[u8],
|
boundary: &[u8],
|
||||||
is_word: bool,
|
is_word: bool,
|
||||||
) -> (bool, Option<Cow<'x, [u8]>>);
|
) -> (usize, DecodeResult) {
|
||||||
}
|
let mut success = boundary.is_empty();
|
||||||
|
|
||||||
impl<'x> QuotedPrintableDecoder<'x> for MessageStream<'x> {
|
let mut bytes_read = 0;
|
||||||
fn decode_quoted_printable(
|
|
||||||
&self,
|
|
||||||
boundary: &[u8],
|
|
||||||
is_word: bool,
|
|
||||||
) -> (bool, Option<Cow<'x, [u8]>>) {
|
|
||||||
let mut success = boundary.is_empty();
|
|
||||||
|
|
||||||
let start_pos = self.pos.get();
|
let mut buf = Vec::with_capacity(stream.data.len() - start_pos);
|
||||||
let mut read_pos = start_pos;
|
|
||||||
|
|
||||||
let mut buf = Vec::with_capacity(self.data.len() - read_pos);
|
let mut state = QuotedPrintableState::None;
|
||||||
|
let mut match_count = 0;
|
||||||
|
let mut hex1 = 0;
|
||||||
|
|
||||||
let mut state = QuotedPrintableState::None;
|
debug_assert!(boundary.is_empty() || boundary.len() >= 2);
|
||||||
let mut match_count = 0;
|
|
||||||
let mut hex1 = 0;
|
|
||||||
|
|
||||||
debug_assert!(boundary.is_empty() || boundary.len() >= 2);
|
for ch in stream.data[start_pos..].iter() {
|
||||||
|
bytes_read += 1;
|
||||||
|
|
||||||
for ch in self.data[read_pos..].iter() {
|
// if success is false, a boundary was provided
|
||||||
read_pos += 1;
|
if !success {
|
||||||
|
let mut is_boundary_end = true;
|
||||||
|
|
||||||
// if success is false, a boundary was provided
|
if *ch == boundary[match_count] {
|
||||||
if !success {
|
match_count += 1;
|
||||||
let mut is_boundary_end = true;
|
if match_count == boundary.len() {
|
||||||
|
let done = if is_word {
|
||||||
if *ch == boundary[match_count] {
|
true
|
||||||
match_count += 1;
|
|
||||||
if match_count == boundary.len() {
|
|
||||||
let done = if is_word {
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
is_boundary_end = self.is_boundary_end(read_pos);
|
|
||||||
is_boundary_end
|
|
||||||
};
|
|
||||||
|
|
||||||
if done {
|
|
||||||
success = true;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
continue;
|
is_boundary_end =
|
||||||
}
|
crate::parsers::mime::is_boundary_end(stream, start_pos + bytes_read);
|
||||||
}
|
is_boundary_end
|
||||||
|
};
|
||||||
|
|
||||||
if match_count > 0 {
|
if done {
|
||||||
for ch in boundary[..match_count].iter() {
|
success = true;
|
||||||
if *ch != b'\n' || QuotedPrintableState::Eq != state {
|
break;
|
||||||
buf.push(*ch);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
state = QuotedPrintableState::None;
|
|
||||||
|
|
||||||
// is_boundary_end is always true except in the rare event
|
|
||||||
// that a boundary was found without a proper MIME ending (-- or \r\n)
|
|
||||||
if is_boundary_end {
|
|
||||||
if *ch == boundary[0] {
|
|
||||||
// Char matched beginning of boundary, get next char.
|
|
||||||
match_count = 1;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
// Reset match count and decode character
|
|
||||||
match_count = 0;
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
// There was a full boundary match but without a proper MIME
|
|
||||||
// ending, reset match count and continue.
|
|
||||||
match_count = 0;
|
|
||||||
continue;
|
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
match ch {
|
if match_count > 0 {
|
||||||
b'=' => {
|
for ch in boundary[..match_count].iter() {
|
||||||
if let QuotedPrintableState::None = state {
|
if *ch != b'\n' || QuotedPrintableState::Eq != state {
|
||||||
state = QuotedPrintableState::Eq
|
|
||||||
} else {
|
|
||||||
success = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
b'\n' => {
|
|
||||||
if is_word {
|
|
||||||
success = false;
|
|
||||||
break;
|
|
||||||
} else if QuotedPrintableState::Eq == state {
|
|
||||||
state = QuotedPrintableState::None;
|
|
||||||
} else {
|
|
||||||
buf.push(b'\n');
|
|
||||||
}
|
|
||||||
}
|
|
||||||
b'_' if is_word => {
|
|
||||||
buf.push(b' ');
|
|
||||||
}
|
|
||||||
b'\r' => (),
|
|
||||||
_ => match state {
|
|
||||||
QuotedPrintableState::None => {
|
|
||||||
buf.push(*ch);
|
buf.push(*ch);
|
||||||
}
|
}
|
||||||
QuotedPrintableState::Eq => {
|
}
|
||||||
hex1 = HEX_MAP[*ch as usize];
|
state = QuotedPrintableState::None;
|
||||||
if hex1 != -1 {
|
|
||||||
state = QuotedPrintableState::Hex1;
|
|
||||||
} else {
|
|
||||||
success = false;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
QuotedPrintableState::Hex1 => {
|
|
||||||
let hex2 = HEX_MAP[*ch as usize];
|
|
||||||
|
|
||||||
state = QuotedPrintableState::None;
|
// is_boundary_end is always true except in the rare event
|
||||||
if hex2 != -1 {
|
// that a boundary was found without a proper MIME ending (-- or \r\n)
|
||||||
let ch = ((hex1 as u8) << 4) | hex2 as u8;
|
if is_boundary_end {
|
||||||
|
if *ch == boundary[0] {
|
||||||
buf.push(ch);
|
// Char matched beginning of boundary, get next char.
|
||||||
} else {
|
match_count = 1;
|
||||||
success = false;
|
continue;
|
||||||
break;
|
} else {
|
||||||
}
|
// Reset match count and decode character
|
||||||
|
match_count = 0;
|
||||||
}
|
}
|
||||||
},
|
} else {
|
||||||
|
// There was a full boundary match but without a proper MIME
|
||||||
|
// ending, reset match count and continue.
|
||||||
|
match_count = 0;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
self.pos.set(read_pos);
|
match ch {
|
||||||
|
b'=' => {
|
||||||
|
if let QuotedPrintableState::None = state {
|
||||||
|
state = QuotedPrintableState::Eq
|
||||||
|
} else {
|
||||||
|
success = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
b'\n' => {
|
||||||
|
if is_word {
|
||||||
|
success = false;
|
||||||
|
break;
|
||||||
|
} else if QuotedPrintableState::Eq == state {
|
||||||
|
state = QuotedPrintableState::None;
|
||||||
|
} else {
|
||||||
|
buf.push(b'\n');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
b'_' if is_word => {
|
||||||
|
buf.push(b' ');
|
||||||
|
}
|
||||||
|
b'\r' => (),
|
||||||
|
_ => match state {
|
||||||
|
QuotedPrintableState::None => {
|
||||||
|
buf.push(*ch);
|
||||||
|
}
|
||||||
|
QuotedPrintableState::Eq => {
|
||||||
|
hex1 = HEX_MAP[*ch as usize];
|
||||||
|
if hex1 != -1 {
|
||||||
|
state = QuotedPrintableState::Hex1;
|
||||||
|
} else {
|
||||||
|
success = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
QuotedPrintableState::Hex1 => {
|
||||||
|
let hex2 = HEX_MAP[*ch as usize];
|
||||||
|
|
||||||
(
|
state = QuotedPrintableState::None;
|
||||||
success,
|
if hex2 != -1 {
|
||||||
if !buf.is_empty() {
|
let ch = ((hex1 as u8) << 4) | hex2 as u8;
|
||||||
buf.shrink_to_fit();
|
|
||||||
Some(buf.into())
|
buf.push(ch);
|
||||||
} else {
|
} else {
|
||||||
None
|
success = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
(
|
||||||
|
if success { bytes_read } else { 0 },
|
||||||
|
if !buf.is_empty() {
|
||||||
|
buf.shrink_to_fit();
|
||||||
|
DecodeResult::Owned(buf)
|
||||||
|
} else {
|
||||||
|
DecodeResult::Empty
|
||||||
|
},
|
||||||
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::{
|
use crate::{
|
||||||
decoders::quoted_printable::QuotedPrintableDecoder, parsers::message_stream::MessageStream,
|
decoders::{quoted_printable::decode_quoted_printable, DecodeResult},
|
||||||
|
parsers::message::MessageStream,
|
||||||
};
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn decode_quoted_printable() {
|
fn decode_quoted_printable_string() {
|
||||||
let inputs = [
|
let inputs = [
|
||||||
(
|
(
|
||||||
concat!(
|
concat!(
|
||||||
@@ -248,12 +238,22 @@ mod tests {
|
|||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
let stream = MessageStream::new(str.as_bytes());
|
let stream = MessageStream::new(str.as_bytes());
|
||||||
|
|
||||||
let (success, result) = stream.decode_quoted_printable(input.2.as_bytes(), input.3);
|
let (bytes_read, result) =
|
||||||
|
decode_quoted_printable(&stream, 0, input.2.as_bytes(), input.3);
|
||||||
|
|
||||||
assert_eq!(success, !input.1.is_empty(), "Failed for '{:?}'", input.0);
|
assert_eq!(
|
||||||
|
bytes_read > 0,
|
||||||
|
!input.1.is_empty(),
|
||||||
|
"Failed for '{:?}'",
|
||||||
|
input.0
|
||||||
|
);
|
||||||
|
|
||||||
if !input.1.is_empty() {
|
if !input.1.is_empty() {
|
||||||
let result_str = std::str::from_utf8(result.as_ref().unwrap()).unwrap();
|
let bytes = match result {
|
||||||
|
DecodeResult::Owned(v) => v,
|
||||||
|
_ => unreachable!(),
|
||||||
|
};
|
||||||
|
let result_str = std::str::from_utf8(&bytes).unwrap();
|
||||||
|
|
||||||
/*println!(
|
/*println!(
|
||||||
"Decoded '{}'\n -> to ->\n'{}'\n{}",
|
"Decoded '{}'\n -> to ->\n'{}'\n{}",
|
||||||
@@ -274,13 +274,13 @@ mod tests {
|
|||||||
// MIRI overflow tests
|
// MIRI overflow tests
|
||||||
for input in [b"\x0a\x0a\x00\x0b".to_vec(), b":B\x0a%".to_vec()] {
|
for input in [b"\x0a\x0a\x00\x0b".to_vec(), b":B\x0a%".to_vec()] {
|
||||||
let stream = MessageStream::new(&input[..]);
|
let stream = MessageStream::new(&input[..]);
|
||||||
stream.decode_quoted_printable(b"\n\n", true);
|
decode_quoted_printable(&stream, 0, b"\n\n", true);
|
||||||
let stream = MessageStream::new(&input[..]);
|
let stream = MessageStream::new(&input[..]);
|
||||||
stream.decode_quoted_printable(b"\n\n", false);
|
decode_quoted_printable(&stream, 0, b"\n\n", false);
|
||||||
let stream = MessageStream::new(&input[..]);
|
let stream = MessageStream::new(&input[..]);
|
||||||
stream.decode_quoted_printable(&[], true);
|
decode_quoted_printable(&stream, 0, &[], true);
|
||||||
let stream = MessageStream::new(&input[..]);
|
let stream = MessageStream::new(&input[..]);
|
||||||
stream.decode_quoted_printable(&[], false);
|
decode_quoted_printable(&stream, 0, &[], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+415
-481
File diff suppressed because it is too large
Load Diff
@@ -12,22 +12,10 @@
|
|||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
decoders::encoded_word::parse_encoded_word, parsers::message_stream::MessageStream, Addr,
|
decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream, Addr, Group,
|
||||||
Address, Group,
|
HeaderValue,
|
||||||
};
|
};
|
||||||
|
|
||||||
impl<'x> Default for Address<'x> {
|
|
||||||
fn default() -> Self {
|
|
||||||
Address::Empty
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'x> Address<'x> {
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
*self == Address::Empty
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[derive(PartialEq, Clone, Copy, Debug)]
|
#[derive(PartialEq, Clone, Copy, Debug)]
|
||||||
enum AddressState {
|
enum AddressState {
|
||||||
Address,
|
Address,
|
||||||
@@ -63,9 +51,7 @@ pub fn add_token<'x>(
|
|||||||
add_trail_space: bool,
|
add_trail_space: bool,
|
||||||
) {
|
) {
|
||||||
if parser.token_start > 0 {
|
if parser.token_start > 0 {
|
||||||
let token = stream
|
let token = String::from_utf8_lossy(&stream.data[parser.token_start - 1..parser.token_end]);
|
||||||
.get_string(parser.token_start - 1, parser.token_end)
|
|
||||||
.unwrap();
|
|
||||||
let mut add_space = false;
|
let mut add_space = false;
|
||||||
let list = match parser.state {
|
let list = match parser.state {
|
||||||
AddressState::Address => &mut parser.mail_tokens,
|
AddressState::Address => &mut parser.mail_tokens,
|
||||||
@@ -227,7 +213,7 @@ pub fn add_group(parser: &mut AddressParser) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
pub fn parse_address<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
|
||||||
let mut parser = AddressParser {
|
let mut parser = AddressParser {
|
||||||
token_start: 0,
|
token_start: 0,
|
||||||
token_end: 0,
|
token_end: 0,
|
||||||
@@ -249,13 +235,18 @@ pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
|||||||
result: Vec::new(),
|
result: Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
let mut iter = stream.data[stream.pos..].iter();
|
||||||
|
|
||||||
|
while let Some(ch) = iter.next() {
|
||||||
|
stream.pos += 1;
|
||||||
|
|
||||||
match ch {
|
match ch {
|
||||||
b'\n' => {
|
b'\n' => {
|
||||||
add_token(&mut parser, stream, false);
|
add_token(&mut parser, stream, false);
|
||||||
match stream.peek() {
|
match stream.data.get(stream.pos) {
|
||||||
Some(b' ' | b'\t') => {
|
Some(b' ' | b'\t') => {
|
||||||
stream.advance(1);
|
iter.next();
|
||||||
|
stream.pos += 1;
|
||||||
if !parser.is_token_start {
|
if !parser.is_token_start {
|
||||||
parser.is_token_start = true;
|
parser.is_token_start = true;
|
||||||
}
|
}
|
||||||
@@ -267,7 +258,7 @@ pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
|||||||
b'\\' if parser.state != AddressState::Name => {
|
b'\\' if parser.state != AddressState::Name => {
|
||||||
if parser.token_start > 0 {
|
if parser.token_start > 0 {
|
||||||
if parser.state == AddressState::Quote {
|
if parser.state == AddressState::Quote {
|
||||||
parser.token_end = stream.get_pos() - 1;
|
parser.token_end = stream.pos - 1;
|
||||||
}
|
}
|
||||||
add_token(&mut parser, stream, false);
|
add_token(&mut parser, stream, false);
|
||||||
}
|
}
|
||||||
@@ -308,7 +299,7 @@ pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
|||||||
parser.is_token_email = true;
|
parser.is_token_email = true;
|
||||||
}
|
}
|
||||||
b'=' if parser.is_token_start && !parser.is_escaped => {
|
b'=' if parser.is_token_start && !parser.is_escaped => {
|
||||||
if let Some(token) = parse_encoded_word(stream) {
|
if let (d_bytes_read, Some(token)) = decode_rfc2047(stream, stream.pos) {
|
||||||
let add_space = parser.state != AddressState::Quote; // Make borrow-checker happy
|
let add_space = parser.state != AddressState::Quote; // Make borrow-checker happy
|
||||||
add_token(&mut parser, stream, add_space);
|
add_token(&mut parser, stream, add_space);
|
||||||
(if parser.state != AddressState::Comment {
|
(if parser.state != AddressState::Comment {
|
||||||
@@ -317,6 +308,8 @@ pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
|||||||
&mut parser.comment_tokens
|
&mut parser.comment_tokens
|
||||||
})
|
})
|
||||||
.push(token.into());
|
.push(token.into());
|
||||||
|
stream.pos += d_bytes_read;
|
||||||
|
iter = stream.data[stream.pos..].iter();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -329,10 +322,10 @@ pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
|||||||
}
|
}
|
||||||
if parser.state == AddressState::Quote {
|
if parser.state == AddressState::Quote {
|
||||||
if parser.token_start == 0 {
|
if parser.token_start == 0 {
|
||||||
parser.token_start = stream.get_pos();
|
parser.token_start = stream.pos;
|
||||||
parser.token_end = parser.token_start;
|
parser.token_end = parser.token_start;
|
||||||
} else {
|
} else {
|
||||||
parser.token_end = stream.get_pos();
|
parser.token_end = stream.pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
@@ -378,10 +371,10 @@ pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if parser.token_start == 0 {
|
if parser.token_start == 0 {
|
||||||
parser.token_start = stream.get_pos();
|
parser.token_start = stream.pos;
|
||||||
parser.token_end = parser.token_start;
|
parser.token_end = parser.token_start;
|
||||||
} else {
|
} else {
|
||||||
parser.token_end = stream.get_pos();
|
parser.token_end = stream.pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -390,25 +383,25 @@ pub fn parse_address<'x>(stream: &MessageStream<'x>) -> Address<'x> {
|
|||||||
if parser.group_name.is_some() || !parser.result.is_empty() {
|
if parser.group_name.is_some() || !parser.result.is_empty() {
|
||||||
add_group(&mut parser);
|
add_group(&mut parser);
|
||||||
if parser.result.len() > 1 {
|
if parser.result.len() > 1 {
|
||||||
Address::GroupList(parser.result)
|
HeaderValue::GroupList(parser.result)
|
||||||
} else {
|
} else {
|
||||||
Address::Group(parser.result.pop().unwrap())
|
HeaderValue::Group(parser.result.pop().unwrap())
|
||||||
}
|
}
|
||||||
} else if !parser.addresses.is_empty() {
|
} else if !parser.addresses.is_empty() {
|
||||||
if parser.addresses.len() > 1 {
|
if parser.addresses.len() > 1 {
|
||||||
Address::AddressList(parser.addresses)
|
HeaderValue::AddressList(parser.addresses)
|
||||||
} else {
|
} else {
|
||||||
Address::Address(parser.addresses.pop().unwrap())
|
HeaderValue::Address(parser.addresses.pop().unwrap())
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
Address::Empty
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
mod tests {
|
mod tests {
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_addresses() {
|
fn parse_addresses() {
|
||||||
use crate::parsers::{fields::address::parse_address, message_stream::MessageStream};
|
use crate::parsers::fields::address::parse_address;
|
||||||
|
|
||||||
use super::*;
|
use super::*;
|
||||||
|
|
||||||
@@ -931,8 +924,8 @@ mod tests {
|
|||||||
for input in inputs {
|
for input in inputs {
|
||||||
println!("Testiong {}", input.0);
|
println!("Testiong {}", input.0);
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
let result = parse_address(&MessageStream::new(str.as_bytes()));
|
let result = parse_address(&mut MessageStream::new(str.as_bytes()));
|
||||||
let expected: Address = serde_yaml::from_str(input.1).unwrap_or(Address::Empty);
|
let expected: HeaderValue = serde_yaml::from_str(input.1).unwrap_or(HeaderValue::Empty);
|
||||||
|
|
||||||
/*if input.0.len() >= 70 {
|
/*if input.0.len() >= 70 {
|
||||||
println!(
|
println!(
|
||||||
|
|||||||
+972
-778
File diff suppressed because it is too large
Load Diff
+24
-18
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
use std::fmt;
|
use std::fmt;
|
||||||
|
|
||||||
use crate::{parsers::message_stream::MessageStream, DateTime};
|
use crate::{parsers::message::MessageStream, DateTime, HeaderValue};
|
||||||
|
|
||||||
impl DateTime {
|
impl DateTime {
|
||||||
/// Returns an ISO-8601 representation of the parsed RFC5322 datetime field
|
/// Returns an ISO-8601 representation of the parsed RFC5322 datetime field
|
||||||
@@ -37,7 +37,7 @@ impl fmt::Display for DateTime {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_date(stream: &MessageStream, abort_on_invalid: bool) -> Option<DateTime> {
|
pub fn parse_date<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
|
||||||
let mut pos = 0;
|
let mut pos = 0;
|
||||||
let mut parts = [0u32; 7];
|
let mut parts = [0u32; 7];
|
||||||
let mut parts_sizes = [
|
let mut parts_sizes = [
|
||||||
@@ -57,13 +57,18 @@ pub fn parse_date(stream: &MessageStream, abort_on_invalid: bool) -> Option<Date
|
|||||||
let mut ignore = true;
|
let mut ignore = true;
|
||||||
let mut comment_count = 0;
|
let mut comment_count = 0;
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
let mut iter = stream.data[stream.pos..].iter();
|
||||||
|
|
||||||
|
while let Some(ch) = iter.next() {
|
||||||
let mut next_part = false;
|
let mut next_part = false;
|
||||||
|
stream.pos += 1;
|
||||||
|
|
||||||
match ch {
|
match ch {
|
||||||
b'\n' => match stream.peek() {
|
b'\n' => match stream.data.get(stream.pos) {
|
||||||
Some(b' ' | b'\t') => {
|
Some(b' ' | b'\t') => {
|
||||||
stream.advance(1);
|
iter.next();
|
||||||
|
stream.pos += 1;
|
||||||
|
|
||||||
if !is_new_token && !ignore && comment_count == 0 {
|
if !is_new_token && !ignore && comment_count == 0 {
|
||||||
next_part = true;
|
next_part = true;
|
||||||
} else {
|
} else {
|
||||||
@@ -78,7 +83,9 @@ pub fn parse_date(stream: &MessageStream, abort_on_invalid: bool) -> Option<Date
|
|||||||
} else if *ch == b'(' {
|
} else if *ch == b'(' {
|
||||||
comment_count += 1;
|
comment_count += 1;
|
||||||
} else if *ch == b'\\' {
|
} else if *ch == b'\\' {
|
||||||
stream.skip_byte(&b')');
|
if let Some(b')') = stream.data.get(stream.pos) {
|
||||||
|
stream.pos += 1;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -131,12 +138,7 @@ pub fn parse_date(stream: &MessageStream, abort_on_invalid: bool) -> Option<Date
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
b',' | b'\r' => (),
|
b',' | b'\r' => (),
|
||||||
_ => {
|
_ => (),
|
||||||
if abort_on_invalid {
|
|
||||||
stream.rewind(1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if next_part {
|
if next_part {
|
||||||
@@ -149,7 +151,7 @@ pub fn parse_date(stream: &MessageStream, abort_on_invalid: bool) -> Option<Date
|
|||||||
}
|
}
|
||||||
|
|
||||||
if pos >= 6 {
|
if pos >= 6 {
|
||||||
Some(DateTime {
|
HeaderValue::DateTime(DateTime {
|
||||||
year: if (1..=99).contains(&parts[2]) {
|
year: if (1..=99).contains(&parts[2]) {
|
||||||
parts[2] + 1900
|
parts[2] + 1900
|
||||||
} else {
|
} else {
|
||||||
@@ -169,7 +171,7 @@ pub fn parse_date(stream: &MessageStream, abort_on_invalid: bool) -> Option<Date
|
|||||||
tz_before_gmt: !is_plus,
|
tz_before_gmt: !is_plus,
|
||||||
})
|
})
|
||||||
} else {
|
} else {
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -193,7 +195,10 @@ pub static MONTH_MAP: &[u8; 31] = &[
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::{fields::date::parse_date, message_stream::MessageStream};
|
use crate::{
|
||||||
|
parsers::{fields::date::parse_date, message::MessageStream},
|
||||||
|
HeaderValue,
|
||||||
|
};
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_dates() {
|
fn parse_dates() {
|
||||||
@@ -259,15 +264,16 @@ mod tests {
|
|||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
match parse_date(&MessageStream::new(str.as_bytes()), false) {
|
match parse_date(&mut MessageStream::new(str.as_bytes())) {
|
||||||
Some(date) => {
|
HeaderValue::DateTime(date) => {
|
||||||
//println!("{} -> {}", input.0.escape_debug(), date.to_iso8601());
|
//println!("{} -> {}", input.0.escape_debug(), date.to_iso8601());
|
||||||
assert_eq!(input.1, date.to_iso8601());
|
assert_eq!(input.1, date.to_iso8601());
|
||||||
}
|
}
|
||||||
None => {
|
HeaderValue::Empty => {
|
||||||
//println!("{} -> None", input.0.escape_debug());
|
//println!("{} -> None", input.0.escape_debug());
|
||||||
assert!(input.1.is_empty());
|
assert!(input.1.is_empty());
|
||||||
}
|
}
|
||||||
|
_ => panic!("Unexpected result"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+36
-19
@@ -9,24 +9,32 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use crate::{parsers::message::MessageStream, HeaderValue};
|
||||||
|
|
||||||
use crate::parsers::message_stream::MessageStream;
|
pub fn parse_id<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
|
||||||
|
|
||||||
pub fn parse_id<'x>(stream: &MessageStream<'x>) -> Option<Vec<Cow<'x, str>>> {
|
|
||||||
let mut token_start: usize = 0;
|
let mut token_start: usize = 0;
|
||||||
let mut token_end: usize = 0;
|
let mut token_end: usize = 0;
|
||||||
let mut is_id_part = false;
|
let mut is_id_part = false;
|
||||||
let mut ids = Vec::new();
|
let mut ids = Vec::new();
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
let mut iter = stream.data[stream.pos..].iter();
|
||||||
|
|
||||||
|
while let Some(ch) = iter.next() {
|
||||||
|
stream.pos += 1;
|
||||||
match ch {
|
match ch {
|
||||||
b'\n' => match stream.peek() {
|
b'\n' => match stream.data.get(stream.pos) {
|
||||||
Some(b' ' | b'\t') => {
|
Some(b' ' | b'\t') => {
|
||||||
stream.advance(1);
|
iter.next();
|
||||||
|
stream.pos += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ => return if !ids.is_empty() { Some(ids) } else { None },
|
_ => {
|
||||||
|
return match ids.len() {
|
||||||
|
1 => HeaderValue::Text(ids.pop().unwrap()),
|
||||||
|
0 => HeaderValue::Empty,
|
||||||
|
_ => HeaderValue::TextList(ids),
|
||||||
|
};
|
||||||
|
}
|
||||||
},
|
},
|
||||||
b'<' => {
|
b'<' => {
|
||||||
is_id_part = true;
|
is_id_part = true;
|
||||||
@@ -35,7 +43,9 @@ pub fn parse_id<'x>(stream: &MessageStream<'x>) -> Option<Vec<Cow<'x, str>>> {
|
|||||||
b'>' => {
|
b'>' => {
|
||||||
is_id_part = false;
|
is_id_part = false;
|
||||||
if token_start > 0 {
|
if token_start > 0 {
|
||||||
ids.push(stream.get_string(token_start - 1, token_end).unwrap());
|
ids.push(String::from_utf8_lossy(
|
||||||
|
&stream.data[token_start - 1..token_end],
|
||||||
|
));
|
||||||
token_start = 0;
|
token_start = 0;
|
||||||
} else {
|
} else {
|
||||||
continue;
|
continue;
|
||||||
@@ -46,17 +56,20 @@ pub fn parse_id<'x>(stream: &MessageStream<'x>) -> Option<Vec<Cow<'x, str>>> {
|
|||||||
}
|
}
|
||||||
if is_id_part {
|
if is_id_part {
|
||||||
if token_start == 0 {
|
if token_start == 0 {
|
||||||
token_start = stream.get_pos();
|
token_start = stream.pos;
|
||||||
}
|
}
|
||||||
token_end = stream.get_pos();
|
token_end = stream.pos;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
None
|
|
||||||
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::{fields::id::parse_id, message_stream::MessageStream};
|
use crate::parsers::fields::id::parse_id;
|
||||||
|
use crate::parsers::message::MessageStream;
|
||||||
|
use crate::HeaderValue;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_message_ids() {
|
fn parse_message_ids() {
|
||||||
@@ -93,12 +106,16 @@ mod tests {
|
|||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
match parse_id(&mut MessageStream::new(str.as_bytes())) {
|
||||||
input.1,
|
HeaderValue::TextList(ids) => {
|
||||||
parse_id(&MessageStream::new(str.as_bytes())).unwrap(),
|
assert_eq!(ids, input.1, "Failed to parse '{:?}'", input.0);
|
||||||
"Failed to parse '{:?}'",
|
}
|
||||||
input.0
|
HeaderValue::Text(id) => {
|
||||||
);
|
assert!(input.1.len() == 1, "Failed to parse '{:?}'", input.0);
|
||||||
|
assert_eq!(id, input.1[0], "Failed to parse '{:?}'", input.0);
|
||||||
|
}
|
||||||
|
_ => panic!("Unexpected result"),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+37
-23
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use crate::{decoders::encoded_word::parse_encoded_word, parsers::message_stream::MessageStream};
|
use crate::{decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream, HeaderValue};
|
||||||
|
|
||||||
struct ListParser<'x> {
|
struct ListParser<'x> {
|
||||||
token_start: usize,
|
token_start: usize,
|
||||||
@@ -26,11 +26,9 @@ fn add_token<'x>(parser: &mut ListParser<'x>, stream: &MessageStream<'x>, add_sp
|
|||||||
if !parser.tokens.is_empty() {
|
if !parser.tokens.is_empty() {
|
||||||
parser.tokens.push(" ".into());
|
parser.tokens.push(" ".into());
|
||||||
}
|
}
|
||||||
parser.tokens.push(
|
parser.tokens.push(String::from_utf8_lossy(
|
||||||
stream
|
&stream.data[parser.token_start - 1..parser.token_end],
|
||||||
.get_string(parser.token_start - 1, parser.token_end)
|
));
|
||||||
.unwrap(),
|
|
||||||
);
|
|
||||||
|
|
||||||
if add_space {
|
if add_space {
|
||||||
parser.tokens.push(" ".into());
|
parser.tokens.push(" ".into());
|
||||||
@@ -53,7 +51,7 @@ fn add_tokens_to_list(parser: &mut ListParser) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_comma_separared<'x>(stream: &MessageStream<'x>) -> Option<Vec<Cow<'x, str>>> {
|
pub fn parse_comma_separared<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
|
||||||
let mut parser = ListParser {
|
let mut parser = ListParser {
|
||||||
token_start: 0,
|
token_start: 0,
|
||||||
token_end: 0,
|
token_end: 0,
|
||||||
@@ -62,25 +60,30 @@ pub fn parse_comma_separared<'x>(stream: &MessageStream<'x>) -> Option<Vec<Cow<'
|
|||||||
list: Vec::new(),
|
list: Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
let mut iter = stream.data[stream.pos..].iter();
|
||||||
|
|
||||||
|
while let Some(ch) = iter.next() {
|
||||||
|
stream.pos += 1;
|
||||||
match ch {
|
match ch {
|
||||||
b'\n' => {
|
b'\n' => {
|
||||||
add_token(&mut parser, stream, false);
|
add_token(&mut parser, stream, false);
|
||||||
|
|
||||||
match stream.peek() {
|
match stream.data.get(stream.pos) {
|
||||||
Some(b' ' | b'\t') => {
|
Some(b' ' | b'\t') => {
|
||||||
if !parser.is_token_start {
|
if !parser.is_token_start {
|
||||||
parser.is_token_start = true;
|
parser.is_token_start = true;
|
||||||
}
|
}
|
||||||
stream.advance(1);
|
iter.next();
|
||||||
|
stream.pos += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
add_tokens_to_list(&mut parser);
|
add_tokens_to_list(&mut parser);
|
||||||
return if !parser.list.is_empty() {
|
|
||||||
parser.list.into()
|
return match parser.list.len() {
|
||||||
} else {
|
1 => HeaderValue::Text(parser.list.pop().unwrap()),
|
||||||
None
|
0 => HeaderValue::Empty,
|
||||||
|
_ => HeaderValue::TextList(parser.list),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -92,9 +95,11 @@ pub fn parse_comma_separared<'x>(stream: &MessageStream<'x>) -> Option<Vec<Cow<'
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
b'=' if parser.is_token_start => {
|
b'=' if parser.is_token_start => {
|
||||||
if let Some(token) = parse_encoded_word(stream) {
|
if let (bytes_read, Some(token)) = decode_rfc2047(stream, stream.pos) {
|
||||||
add_token(&mut parser, stream, true);
|
add_token(&mut parser, stream, true);
|
||||||
parser.tokens.push(token.into());
|
parser.tokens.push(token.into());
|
||||||
|
stream.pos += bytes_read;
|
||||||
|
iter = stream.data[stream.pos..].iter();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -112,18 +117,20 @@ pub fn parse_comma_separared<'x>(stream: &MessageStream<'x>) -> Option<Vec<Cow<'
|
|||||||
}
|
}
|
||||||
|
|
||||||
if parser.token_start == 0 {
|
if parser.token_start == 0 {
|
||||||
parser.token_start = stream.get_pos();
|
parser.token_start = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
parser.token_end = stream.get_pos();
|
parser.token_end = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::{fields::list::parse_comma_separared, message_stream::MessageStream};
|
use crate::parsers::fields::list::parse_comma_separared;
|
||||||
|
use crate::parsers::message::MessageStream;
|
||||||
|
use crate::HeaderValue;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_comma_separated_text() {
|
fn parse_comma_separated_text() {
|
||||||
@@ -166,10 +173,17 @@ mod tests {
|
|||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
|
||||||
parse_comma_separared(&MessageStream::new(str.as_bytes()),).unwrap(),
|
match parse_comma_separared(&mut MessageStream::new(str.as_bytes())) {
|
||||||
input.1
|
HeaderValue::TextList(ids) => {
|
||||||
);
|
assert_eq!(ids, input.1, "Failed to parse '{:?}'", input.0);
|
||||||
|
}
|
||||||
|
HeaderValue::Text(id) => {
|
||||||
|
assert!(input.1.len() == 1, "Failed to parse '{:?}'", input.0);
|
||||||
|
assert_eq!(id, input.1[0], "Failed to parse '{:?}'", input.0);
|
||||||
|
}
|
||||||
|
_ => panic!("Unexpected result"),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,20 +9,6 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use std::borrow::Cow;
|
|
||||||
|
|
||||||
use crate::{Address, DateTime, MessageHeader, MimeFieldGet, MimeHeader};
|
|
||||||
|
|
||||||
use self::{
|
|
||||||
address::parse_address,
|
|
||||||
id::parse_id,
|
|
||||||
list::parse_comma_separared,
|
|
||||||
raw::{parse_and_ignore, parse_raw},
|
|
||||||
unstructured::parse_unstructured,
|
|
||||||
};
|
|
||||||
|
|
||||||
use super::message_stream::MessageStream;
|
|
||||||
|
|
||||||
pub mod address;
|
pub mod address;
|
||||||
pub mod content_type;
|
pub mod content_type;
|
||||||
pub mod date;
|
pub mod date;
|
||||||
@@ -30,552 +16,3 @@ pub mod id;
|
|||||||
pub mod list;
|
pub mod list;
|
||||||
pub mod raw;
|
pub mod raw;
|
||||||
pub mod unstructured;
|
pub mod unstructured;
|
||||||
|
|
||||||
pub trait MessageField<'x>: FieldSet<'x> + MimeFieldGet<'x> {}
|
|
||||||
impl<'x, T: FieldSet<'x> + MimeFieldGet<'x>> MessageField<'x> for T {}
|
|
||||||
|
|
||||||
pub trait FieldSet<'x> {
|
|
||||||
fn set_date(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_sender(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_received(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_references(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_cc(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_comments(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_resent_cc(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_content_id(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_resent_message_id(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_reply_to(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_resent_to(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_resent_bcc(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_subject(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_keywords(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_list_help(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_list_id(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_list_owner(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_resent_date(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_to(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_bcc(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_from(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_content_transfer_encoding(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_return_path(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_list_archive(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_resent_sender(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_list_subscribe(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_message_id(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_content_type(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_list_post(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_in_reply_to(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_content_description(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_resent_from(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_content_disposition(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_list_unsubscribe(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_mime_version(&mut self, stream: &MessageStream<'x>);
|
|
||||||
fn set_unsupported(&mut self, stream: &MessageStream<'x>, name: &'x [u8]);
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'x> FieldSet<'x> for MessageHeader<'x> {
|
|
||||||
fn set_date(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.date = self::date::parse_date(stream, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_sender(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.sender = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_received(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_line(&mut self.received, parse_raw(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_references(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.references = parse_id(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_cc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.cc = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_comments(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_line(&mut self.comments, parse_unstructured(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_cc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_address_line(&mut self.resent_cc, parse_address(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_message_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_line_many(&mut self.resent_message_id, parse_id(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_reply_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.reply_to = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_address_line(&mut self.resent_to, parse_address(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_bcc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_address_line(&mut self.resent_bcc, parse_address(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_subject(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.subject = parse_unstructured(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_keywords(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_line_many(&mut self.keywords, parse_comma_separared(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_help(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.list_help = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.list_id = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_owner(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.list_owner = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_date(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_date_line(&mut self.resent_date, self::date::parse_date(stream, false));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.to = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_bcc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.bcc = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_from(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.from = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_return_path(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_line_many(&mut self.return_path, parse_id(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_archive(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.list_archive = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_sender(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_address_line(&mut self.resent_sender, parse_address(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_subscribe(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.list_subscribe = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_message_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.message_id = parse_id(stream).map(|mut v| v.pop().unwrap());
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_post(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.list_post = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_in_reply_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.reply_to = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_from(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
append_address_line(&mut self.resent_from, parse_address(stream));
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_unsubscribe(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.list_unsubscribe = parse_address(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_mime_version(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.mime_version = parse_raw(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_unsupported(&mut self, stream: &MessageStream<'x>, name: &'x [u8]) {
|
|
||||||
if let Ok(name) = std::str::from_utf8(name) {
|
|
||||||
if let Some(value) = parse_unstructured(stream) {
|
|
||||||
if let Some(arr) = self.others.get_mut(name) {
|
|
||||||
arr.push(value);
|
|
||||||
} else {
|
|
||||||
self.others.insert(name, vec![value]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_id = parse_id(stream).map(|mut v| v.pop().unwrap());
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_transfer_encoding(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_transfer_encoding = parse_unstructured(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_type(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_type = self::content_type::parse_content_type(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_description(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_description = parse_unstructured(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_disposition(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_disposition = self::content_type::parse_content_type(stream);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'x> FieldSet<'x> for MimeHeader<'x> {
|
|
||||||
fn set_date(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_sender(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_received(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_references(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_cc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_comments(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_cc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_message_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_reply_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_bcc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_subject(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_keywords(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_help(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_owner(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_date(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_bcc(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_from(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_return_path(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_archive(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_sender(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_subscribe(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_message_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_post(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_in_reply_to(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_resent_from(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_list_unsubscribe(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_mime_version(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_unsupported(&mut self, stream: &MessageStream<'x>, _name: &'x [u8]) {
|
|
||||||
parse_and_ignore(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_id(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_id = parse_id(stream).map(|mut v| v.pop().unwrap());
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_transfer_encoding(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_transfer_encoding = parse_unstructured(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_type(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_type = self::content_type::parse_content_type(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_description(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_description = parse_unstructured(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn set_content_disposition(&mut self, stream: &MessageStream<'x>) {
|
|
||||||
self.content_disposition = self::content_type::parse_content_type(stream);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_date<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_date(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_sender<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_sender(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_received<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_received(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_references<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_references(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_cc<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_cc(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_comments<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_comments(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_resent_cc<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_resent_cc(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_content_id<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_content_id(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_resent_message_id<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_resent_message_id(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_reply_to<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_reply_to(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_resent_to<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_resent_to(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_resent_bcc<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_resent_bcc(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_subject<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_subject(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_keywords<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_keywords(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_list_help<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_list_help(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_list_id<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_list_id(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_list_owner<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_list_owner(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_resent_date<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_resent_date(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_to<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_to(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_bcc<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_bcc(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_from<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_from(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_content_transfer_encoding<'x>(
|
|
||||||
header: &mut dyn MessageField<'x>,
|
|
||||||
stream: &MessageStream<'x>,
|
|
||||||
) {
|
|
||||||
header.set_content_transfer_encoding(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_return_path<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_return_path(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_list_archive<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_list_archive(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_resent_sender<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_resent_sender(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_list_subscribe<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_list_subscribe(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_message_id<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_message_id(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_content_type<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_content_type(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_list_post<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_list_post(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_in_reply_to<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_in_reply_to(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_content_description<'x>(
|
|
||||||
header: &mut dyn MessageField<'x>,
|
|
||||||
stream: &MessageStream<'x>,
|
|
||||||
) {
|
|
||||||
header.set_content_description(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_resent_from<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_resent_from(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_content_disposition<'x>(
|
|
||||||
header: &mut dyn MessageField<'x>,
|
|
||||||
stream: &MessageStream<'x>,
|
|
||||||
) {
|
|
||||||
header.set_content_disposition(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_list_unsubscribe<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_list_unsubscribe(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_mime_version<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) {
|
|
||||||
header.set_mime_version(stream);
|
|
||||||
}
|
|
||||||
|
|
||||||
fn append_address_line<'x>(value: &mut Address<'x>, new_value: Address<'x>) {
|
|
||||||
if new_value != Address::Empty {
|
|
||||||
match value {
|
|
||||||
Address::Collection(ref mut arr) => {
|
|
||||||
arr.push(new_value);
|
|
||||||
}
|
|
||||||
Address::Empty => *value = new_value,
|
|
||||||
_ => {
|
|
||||||
*value = Address::Collection(vec![std::mem::take(value), new_value]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn append_date_line(value: &mut Option<Vec<DateTime>>, new_value: Option<DateTime>) {
|
|
||||||
if let Some(new_value) = new_value {
|
|
||||||
if let Some(value) = value {
|
|
||||||
value.push(new_value);
|
|
||||||
} else {
|
|
||||||
*value = Some(vec![new_value]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn append_line<'x>(value: &mut Option<Vec<Cow<'x, str>>>, new_value: Option<Cow<'x, str>>) {
|
|
||||||
if let Some(new_value) = new_value {
|
|
||||||
if let Some(value) = value {
|
|
||||||
value.push(new_value);
|
|
||||||
} else {
|
|
||||||
*value = Some(vec![new_value]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fn append_line_many<'x>(
|
|
||||||
value: &mut Option<Vec<Cow<'x, str>>>,
|
|
||||||
new_value: Option<Vec<Cow<'x, str>>>,
|
|
||||||
) {
|
|
||||||
if let Some(mut new_value) = new_value {
|
|
||||||
if let Some(value) = value {
|
|
||||||
value.append(&mut new_value);
|
|
||||||
} else {
|
|
||||||
*value = Some(new_value);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn parse_no_op<'x>(_header: &mut dyn MessageField<'x>, _stream: &MessageStream<'x>) {}
|
|
||||||
|
|
||||||
pub fn parse_unsupported<'x>(
|
|
||||||
header: &mut dyn MessageField<'x>,
|
|
||||||
stream: &MessageStream<'x>,
|
|
||||||
|
|
||||||
name: &'x [u8],
|
|
||||||
) {
|
|
||||||
header.set_unsupported(stream, name);
|
|
||||||
}
|
|
||||||
|
|||||||
+29
-22
@@ -9,29 +9,30 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use std::borrow::Cow;
|
use crate::{parsers::message::MessageStream, HeaderValue};
|
||||||
|
|
||||||
use crate::parsers::message_stream::MessageStream;
|
pub fn parse_raw<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
|
||||||
|
|
||||||
pub fn parse_raw<'x>(stream: &MessageStream<'x>) -> Option<Cow<'x, str>> {
|
|
||||||
let mut token_start: usize = 0;
|
let mut token_start: usize = 0;
|
||||||
let mut token_end: usize = 0;
|
let mut token_end: usize = 0;
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
let mut iter = stream.data[stream.pos..].iter();
|
||||||
|
|
||||||
|
while let Some(ch) = iter.next() {
|
||||||
|
stream.pos += 1;
|
||||||
match ch {
|
match ch {
|
||||||
b'\n' => match stream.peek() {
|
b'\n' => match stream.data.get(stream.pos) {
|
||||||
Some(b' ' | b'\t') => {
|
Some(b' ' | b'\t') => {
|
||||||
stream.advance(1);
|
iter.next();
|
||||||
|
stream.pos += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return if token_start > 0 {
|
return if token_start > 0 {
|
||||||
stream
|
HeaderValue::Text(String::from_utf8_lossy(
|
||||||
.get_string(token_start - 1, token_end)
|
&stream.data[token_start - 1..token_end],
|
||||||
.unwrap()
|
))
|
||||||
.into()
|
|
||||||
} else {
|
} else {
|
||||||
None
|
HeaderValue::Empty
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -40,24 +41,29 @@ pub fn parse_raw<'x>(stream: &MessageStream<'x>) -> Option<Cow<'x, str>> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if token_start == 0 {
|
if token_start == 0 {
|
||||||
token_start = stream.get_pos();
|
token_start = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
token_end = stream.get_pos();
|
token_end = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_and_ignore(stream: &MessageStream) {
|
pub fn parse_and_ignore(stream: &mut MessageStream) {
|
||||||
while let Some(ch) = stream.next() {
|
let mut iter = stream.data[stream.pos..].iter();
|
||||||
|
|
||||||
|
while let Some(ch) = iter.next() {
|
||||||
|
stream.pos += 1;
|
||||||
|
|
||||||
if ch == &b'\n' {
|
if ch == &b'\n' {
|
||||||
match stream.peek() {
|
match stream.data.get(stream.pos) {
|
||||||
Some(b' ' | b'\t') => {
|
Some(b' ' | b'\t') => {
|
||||||
stream.advance(1);
|
iter.next();
|
||||||
|
stream.pos += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ => return,
|
_ => break,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -65,7 +71,8 @@ pub fn parse_and_ignore(stream: &MessageStream) {
|
|||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::{fields::raw::parse_raw, message_stream::MessageStream};
|
use crate::parsers::fields::raw::parse_raw;
|
||||||
|
use crate::parsers::message::MessageStream;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_raw_text() {
|
fn parse_raw_text() {
|
||||||
@@ -89,7 +96,7 @@ mod tests {
|
|||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_raw(&MessageStream::new(str.as_bytes())).unwrap(),
|
parse_raw(&mut MessageStream::new(str.as_bytes())).unwrap_text(),
|
||||||
input.1,
|
input.1,
|
||||||
"Failed for '{:?}'",
|
"Failed for '{:?}'",
|
||||||
input.0
|
input.0
|
||||||
|
|||||||
@@ -11,7 +11,7 @@
|
|||||||
|
|
||||||
use std::borrow::Cow;
|
use std::borrow::Cow;
|
||||||
|
|
||||||
use crate::{decoders::encoded_word::parse_encoded_word, parsers::message_stream::MessageStream};
|
use crate::{decoders::encoded_word::decode_rfc2047, parsers::message::MessageStream, HeaderValue};
|
||||||
struct UnstructuredParser<'x> {
|
struct UnstructuredParser<'x> {
|
||||||
token_start: usize,
|
token_start: usize,
|
||||||
token_end: usize,
|
token_end: usize,
|
||||||
@@ -24,11 +24,9 @@ fn add_token<'x>(parser: &mut UnstructuredParser<'x>, stream: &MessageStream<'x>
|
|||||||
if !parser.tokens.is_empty() {
|
if !parser.tokens.is_empty() {
|
||||||
parser.tokens.push(" ".into());
|
parser.tokens.push(" ".into());
|
||||||
}
|
}
|
||||||
parser.tokens.push(
|
parser.tokens.push(String::from_utf8_lossy(
|
||||||
stream
|
&stream.data[parser.token_start - 1..parser.token_end],
|
||||||
.get_string(parser.token_start - 1, parser.token_end)
|
));
|
||||||
.unwrap(),
|
|
||||||
);
|
|
||||||
|
|
||||||
if add_space {
|
if add_space {
|
||||||
parser.tokens.push(" ".into());
|
parser.tokens.push(" ".into());
|
||||||
@@ -39,7 +37,7 @@ fn add_token<'x>(parser: &mut UnstructuredParser<'x>, stream: &MessageStream<'x>
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_unstructured<'x>(stream: &MessageStream<'x>) -> Option<Cow<'x, str>> {
|
pub fn parse_unstructured<'x>(stream: &mut MessageStream<'x>) -> HeaderValue<'x> {
|
||||||
let mut parser = UnstructuredParser {
|
let mut parser = UnstructuredParser {
|
||||||
token_start: 0,
|
token_start: 0,
|
||||||
token_end: 0,
|
token_end: 0,
|
||||||
@@ -47,24 +45,28 @@ pub fn parse_unstructured<'x>(stream: &MessageStream<'x>) -> Option<Cow<'x, str>
|
|||||||
tokens: Vec::new(),
|
tokens: Vec::new(),
|
||||||
};
|
};
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
let mut iter = stream.data[stream.pos..].iter();
|
||||||
|
|
||||||
|
while let Some(ch) = iter.next() {
|
||||||
|
stream.pos += 1;
|
||||||
match ch {
|
match ch {
|
||||||
b'\n' => {
|
b'\n' => {
|
||||||
add_token(&mut parser, stream, false);
|
add_token(&mut parser, stream, false);
|
||||||
|
|
||||||
match stream.peek() {
|
match stream.data.get(stream.pos) {
|
||||||
Some(b' ' | b'\t') => {
|
Some(b' ' | b'\t') => {
|
||||||
if !parser.is_token_start {
|
if !parser.is_token_start {
|
||||||
parser.is_token_start = true;
|
parser.is_token_start = true;
|
||||||
}
|
}
|
||||||
stream.advance(1);
|
iter.next();
|
||||||
|
stream.pos += 1;
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
return match parser.tokens.len() {
|
return match parser.tokens.len() {
|
||||||
1 => parser.tokens.pop().unwrap().into(),
|
1 => HeaderValue::Text(parser.tokens.pop().unwrap()),
|
||||||
0 => None,
|
0 => HeaderValue::Empty,
|
||||||
_ => Some(parser.tokens.concat().into()),
|
_ => HeaderValue::Text(parser.tokens.concat().into()),
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -76,9 +78,11 @@ pub fn parse_unstructured<'x>(stream: &MessageStream<'x>) -> Option<Cow<'x, str>
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
b'=' if parser.is_token_start => {
|
b'=' if parser.is_token_start => {
|
||||||
if let Some(token) = parse_encoded_word(stream) {
|
if let (bytes_read, Some(token)) = decode_rfc2047(stream, stream.pos) {
|
||||||
add_token(&mut parser, stream, true);
|
add_token(&mut parser, stream, true);
|
||||||
parser.tokens.push(token.into());
|
parser.tokens.push(token.into());
|
||||||
|
stream.pos += bytes_read;
|
||||||
|
iter = stream.data[stream.pos..].iter();
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -91,13 +95,13 @@ pub fn parse_unstructured<'x>(stream: &MessageStream<'x>) -> Option<Cow<'x, str>
|
|||||||
}
|
}
|
||||||
|
|
||||||
if parser.token_start == 0 {
|
if parser.token_start == 0 {
|
||||||
parser.token_start = stream.get_pos();
|
parser.token_start = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
parser.token_end = stream.get_pos();
|
parser.token_end = stream.pos;
|
||||||
}
|
}
|
||||||
|
|
||||||
None
|
HeaderValue::Empty
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
@@ -105,9 +109,8 @@ mod tests {
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn parse_unstructured_text() {
|
fn parse_unstructured_text() {
|
||||||
use crate::parsers::{
|
use crate::parsers::fields::unstructured::parse_unstructured;
|
||||||
fields::unstructured::parse_unstructured, message_stream::MessageStream,
|
use crate::parsers::message::MessageStream;
|
||||||
};
|
|
||||||
|
|
||||||
let inputs = [
|
let inputs = [
|
||||||
("Saying Hello\n", "Saying Hello", true),
|
("Saying Hello\n", "Saying Hello", true),
|
||||||
@@ -181,7 +184,7 @@ mod tests {
|
|||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
parse_unstructured(&MessageStream::new(str.as_bytes()),).unwrap(),
|
parse_unstructured(&mut MessageStream::new(str.as_bytes()),).unwrap_text(),
|
||||||
input.1,
|
input.1,
|
||||||
"Failed to parse '{:?}'",
|
"Failed to parse '{:?}'",
|
||||||
input.0
|
input.0
|
||||||
|
|||||||
+257
-171
@@ -9,99 +9,115 @@
|
|||||||
* except according to those terms.
|
* except according to those terms.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
use crate::{parsers::message_stream::MessageStream, MessageHeader, MimeHeader};
|
use std::collections::hash_map::Entry;
|
||||||
|
|
||||||
use super::fields::{parse_unsupported, MessageField};
|
use crate::{HeaderName, HeaderValue, Headers};
|
||||||
|
|
||||||
impl<'x> MessageHeader<'x> {
|
use super::{
|
||||||
pub fn new() -> MessageHeader<'x> {
|
fields::{
|
||||||
MessageHeader {
|
address::parse_address,
|
||||||
..Default::default()
|
content_type::parse_content_type,
|
||||||
}
|
date::parse_date,
|
||||||
}
|
id::parse_id,
|
||||||
}
|
list::parse_comma_separared,
|
||||||
|
raw::{parse_and_ignore, parse_raw},
|
||||||
impl<'x> MimeHeader<'x> {
|
unstructured::parse_unstructured,
|
||||||
pub fn new() -> MimeHeader<'x> {
|
},
|
||||||
MimeHeader {
|
message::MessageStream,
|
||||||
..Default::default()
|
};
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn clear(&mut self) {
|
|
||||||
self.content_description = None;
|
|
||||||
self.content_disposition = None;
|
|
||||||
self.content_id = None;
|
|
||||||
self.content_transfer_encoding = None;
|
|
||||||
self.content_type = None;
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn is_empty(&self) -> bool {
|
|
||||||
self.content_description.is_none()
|
|
||||||
&& self.content_disposition.is_none()
|
|
||||||
&& self.content_id.is_none()
|
|
||||||
&& self.content_transfer_encoding.is_none()
|
|
||||||
&& self.content_type.is_none()
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
|
#[derive(Debug, PartialEq)]
|
||||||
pub enum HeaderParserResult<'x> {
|
pub enum HeaderParserResult<'x> {
|
||||||
Supported(fn(&mut dyn MessageField<'x>, &MessageStream<'x>)),
|
Supported(HeaderName),
|
||||||
Unsupported(&'x [u8]),
|
Unsupported(&'x [u8]),
|
||||||
Lf,
|
Lf,
|
||||||
Eof,
|
Eof,
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_headers<'x>(header: &mut dyn MessageField<'x>, stream: &MessageStream<'x>) -> bool {
|
pub fn parse_headers<'x>(headers: &mut Headers<'x>, stream: &mut MessageStream<'x>) -> bool {
|
||||||
loop {
|
loop {
|
||||||
match parse_header_name(stream) {
|
let (bytes_read, result) = parse_header_name(&stream.data[stream.pos..]);
|
||||||
HeaderParserResult::Supported(fnc) => fnc(header, stream),
|
stream.pos += bytes_read;
|
||||||
HeaderParserResult::Unsupported(name) => parse_unsupported(header, stream, name),
|
|
||||||
|
match result {
|
||||||
|
HeaderParserResult::Supported(name) => {
|
||||||
|
let (is_many, parser) = HDR_PARSER[name as usize];
|
||||||
|
|
||||||
|
let value = parser(stream);
|
||||||
|
if !value.is_empty() {
|
||||||
|
if is_many {
|
||||||
|
match headers.entry(name) {
|
||||||
|
Entry::Occupied(mut e) => {
|
||||||
|
if let HeaderValue::Collection(col) = e.get_mut() {
|
||||||
|
col.push(value);
|
||||||
|
} else {
|
||||||
|
let old_value = e.remove();
|
||||||
|
headers.insert(
|
||||||
|
name,
|
||||||
|
HeaderValue::Collection(vec![old_value, value]),
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Entry::Vacant(e) => {
|
||||||
|
e.insert(value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
headers.insert(name, value);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
HeaderParserResult::Unsupported(_name) => parse_and_ignore(stream),
|
||||||
HeaderParserResult::Lf => return true,
|
HeaderParserResult::Lf => return true,
|
||||||
HeaderParserResult::Eof => return false,
|
HeaderParserResult::Eof => return false,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn parse_header_name<'x>(stream: &MessageStream<'x>) -> HeaderParserResult<'x> {
|
pub fn parse_header_name(data: &[u8]) -> (usize, HeaderParserResult) {
|
||||||
let mut token_start: usize = 0;
|
let mut token_start: usize = 0;
|
||||||
let mut token_end: usize = 0;
|
let mut token_end: usize = 0;
|
||||||
let mut token_len: usize = 0;
|
let mut token_len: usize = 0;
|
||||||
let mut token_hash: usize = 0;
|
let mut token_hash: usize = 0;
|
||||||
let mut last_ch: u8 = 0;
|
let mut last_ch: u8 = 0;
|
||||||
|
let mut bytes_read: usize = 0;
|
||||||
|
|
||||||
|
for ch in data.iter() {
|
||||||
|
bytes_read += 1;
|
||||||
|
|
||||||
while let Some(ch) = stream.next() {
|
|
||||||
match ch {
|
match ch {
|
||||||
b':' => {
|
b':' => {
|
||||||
if token_start != 0 {
|
if token_start != 0 {
|
||||||
let field = stream.get_bytes(token_start - 1, token_end).unwrap();
|
let field = &data[token_start - 1..token_end];
|
||||||
|
|
||||||
if (2..=25).contains(&token_len) {
|
if (2..=25).contains(&token_len) {
|
||||||
token_hash +=
|
token_hash +=
|
||||||
token_len + HDR_HASH[last_ch.to_ascii_lowercase() as usize] as usize;
|
token_len + HDR_HASH[last_ch.to_ascii_lowercase() as usize] as usize;
|
||||||
|
|
||||||
if (4..=61).contains(&token_hash) {
|
if (4..=72).contains(&token_hash) {
|
||||||
let token_hash = token_hash - 4;
|
let token_hash = token_hash - 4;
|
||||||
|
|
||||||
if field.eq_ignore_ascii_case(HDR_NAMES[token_hash]) {
|
if field.eq_ignore_ascii_case(HDR_NAMES[token_hash]) {
|
||||||
return HeaderParserResult::Supported(HDR_FNCS[token_hash]);
|
return (
|
||||||
|
bytes_read,
|
||||||
|
HeaderParserResult::Supported(HDR_MAP[token_hash]),
|
||||||
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return HeaderParserResult::Unsupported(field);
|
return (bytes_read, HeaderParserResult::Unsupported(field));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
b'\n' => {
|
b'\n' => {
|
||||||
stream.rewind(1);
|
return (bytes_read - 1, HeaderParserResult::Lf);
|
||||||
return HeaderParserResult::Lf;
|
|
||||||
}
|
}
|
||||||
_ => {
|
_ => {
|
||||||
if !(*ch).is_ascii_whitespace() {
|
if !(*ch).is_ascii_whitespace() {
|
||||||
if token_start == 0 {
|
if token_start == 0 {
|
||||||
token_start = stream.get_pos();
|
token_start = bytes_read;
|
||||||
token_end = token_start;
|
token_end = token_start;
|
||||||
} else {
|
} else {
|
||||||
token_end = stream.get_pos();
|
token_end = bytes_read;
|
||||||
last_ch = *ch;
|
last_ch = *ch;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -113,27 +129,46 @@ pub fn parse_header_name<'x>(stream: &MessageStream<'x>) -> HeaderParserResult<'
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HeaderParserResult::Eof
|
|
||||||
|
(bytes_read, HeaderParserResult::Eof)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*fn set_unsupported(&mut self, stream: &mut MessageStream<'x>, name: &'x [u8]) {
|
||||||
|
if let Ok(name) = std::str::from_utf8(name) {
|
||||||
|
let value = parse_unstructured(stream);
|
||||||
|
if !value.is_empty() {
|
||||||
|
match self.others.entry(name) {
|
||||||
|
Entry::Occupied(mut e) => {
|
||||||
|
if let HeaderValue::Collection(col) = e.get_mut() {
|
||||||
|
col.push(value);
|
||||||
|
} else {
|
||||||
|
let old_value = e.remove();
|
||||||
|
self.others.insert(name,HeaderValue::Collection(vec![old_value, value]));
|
||||||
|
}
|
||||||
|
},
|
||||||
|
Entry::Vacant(e) => {e.insert(value);},
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}*/
|
||||||
|
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
mod tests {
|
mod tests {
|
||||||
use crate::parsers::{
|
use crate::{parsers::header::parse_header_name, HeaderName};
|
||||||
fields::{parse_from, parse_mime_version, parse_received, parse_subject},
|
|
||||||
header::parse_header_name,
|
|
||||||
message_stream::MessageStream,
|
|
||||||
};
|
|
||||||
|
|
||||||
use super::HeaderParserResult;
|
use super::HeaderParserResult;
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn header_name_parse() {
|
fn header_name_parse() {
|
||||||
let inputs = [
|
let inputs = [
|
||||||
("From: ", HeaderParserResult::Supported(parse_from)),
|
("From: ", HeaderParserResult::Supported(HeaderName::From)),
|
||||||
("receiVED: ", HeaderParserResult::Supported(parse_received)),
|
(
|
||||||
|
"receiVED: ",
|
||||||
|
HeaderParserResult::Supported(HeaderName::Received),
|
||||||
|
),
|
||||||
(
|
(
|
||||||
" subject : ",
|
" subject : ",
|
||||||
HeaderParserResult::Supported(parse_subject),
|
HeaderParserResult::Supported(HeaderName::Subject),
|
||||||
),
|
),
|
||||||
(
|
(
|
||||||
"X-Custom-Field : ",
|
"X-Custom-Field : ",
|
||||||
@@ -146,166 +181,217 @@ mod tests {
|
|||||||
),
|
),
|
||||||
(
|
(
|
||||||
"MIME-version : ",
|
"MIME-version : ",
|
||||||
HeaderParserResult::Supported(parse_mime_version),
|
HeaderParserResult::Supported(HeaderName::MimeVersion),
|
||||||
),
|
),
|
||||||
];
|
];
|
||||||
|
|
||||||
for input in inputs {
|
for input in inputs {
|
||||||
let str = input.0.to_string();
|
let str = input.0.to_string();
|
||||||
match parse_header_name(&MessageStream::new(str.as_bytes())) {
|
let (_, result) = parse_header_name(str.as_bytes());
|
||||||
HeaderParserResult::Supported(f) => {
|
assert_eq!(input.1, result, "Failed to parse '{:?}'", input.0);
|
||||||
if let HeaderParserResult::Supported(val) = input.1 {
|
|
||||||
if f as usize == val as usize {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
HeaderParserResult::Unsupported(name) => {
|
|
||||||
if let HeaderParserResult::Unsupported(val) = input.1 {
|
|
||||||
if name == val {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
_ => panic!("Eof/Lf for '{:?}'", input.0),
|
|
||||||
}
|
|
||||||
panic!("Failed to parse '{:?}'", input.0)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[allow(clippy::type_complexity)]
|
||||||
|
static HDR_PARSER: &[(
|
||||||
|
bool,
|
||||||
|
for<'x, 'y> fn(&mut MessageStream<'x>) -> HeaderValue<'x>,
|
||||||
|
)] = &[
|
||||||
|
(false, parse_unstructured), // Subject = 0,
|
||||||
|
(false, parse_address), // From = 1,
|
||||||
|
(false, parse_address), // To = 2,
|
||||||
|
(false, parse_address), // Cc = 3,
|
||||||
|
(false, parse_date), // Date = 4,
|
||||||
|
(false, parse_address), // Bcc = 5,
|
||||||
|
(false, parse_address), // ReplyTo = 6,
|
||||||
|
(false, parse_address), // Sender = 7,
|
||||||
|
(true, parse_unstructured), // Comments = 8,
|
||||||
|
(false, parse_address), // InReplyTo = 9,
|
||||||
|
(true, parse_comma_separared), // Keywords = 10,
|
||||||
|
(true, parse_raw), // Received = 11,
|
||||||
|
(false, parse_id), // MessageId = 12,
|
||||||
|
(true, parse_id), // References = 13, (RFC 5322 recommends One)
|
||||||
|
(false, parse_id), // ReturnPath = 14,
|
||||||
|
(false, parse_raw), // MimeVersion = 15,
|
||||||
|
(false, parse_unstructured), // ContentDescription = 16,
|
||||||
|
(false, parse_id), // ContentId = 17,
|
||||||
|
(false, parse_comma_separared), // ContentLanguage = 18
|
||||||
|
(false, parse_unstructured), // ContentLocation = 19
|
||||||
|
(false, parse_unstructured), // ContentTransferEncoding = 20,
|
||||||
|
(false, parse_content_type), // ContentType = 21,
|
||||||
|
(false, parse_content_type), // ContentDisposition = 22,
|
||||||
|
(true, parse_address), // ResentTo = 23,
|
||||||
|
(true, parse_address), // ResentFrom = 24,
|
||||||
|
(true, parse_address), // ResentBcc = 25,
|
||||||
|
(true, parse_address), // ResentCc = 26,
|
||||||
|
(true, parse_address), // ResentSender = 27,
|
||||||
|
(true, parse_date), // ResentDate = 28,
|
||||||
|
(true, parse_id), // ResentMessageId = 29,
|
||||||
|
(false, parse_address), // ListArchive = 30,
|
||||||
|
(false, parse_address), // ListHelp = 31,
|
||||||
|
(false, parse_address), // ListId = 32,
|
||||||
|
(false, parse_address), // ListOwner = 33,
|
||||||
|
(false, parse_address), // ListPost = 34,
|
||||||
|
(false, parse_address), // ListSubscribe = 35,
|
||||||
|
(false, parse_address), // ListUnsubscribe = 36,
|
||||||
|
(false, parse_raw), // Unsupported = 37,
|
||||||
|
];
|
||||||
|
|
||||||
static HDR_HASH: &[u8] = &[
|
static HDR_HASH: &[u8] = &[
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 15, 5, 0, 0, 30, 5, 5, 15, 62, 20, 15, 20, 5, 30, 25, 62, 0, 0, 0, 62, 62, 62, 62, 10,
|
73, 0, 20, 5, 0, 0, 25, 0, 5, 20, 73, 25, 25, 30, 10, 10, 5, 73, 0, 0, 15, 73, 73, 73, 73, 20,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62, 62,
|
73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73, 73,
|
||||||
];
|
];
|
||||||
|
|
||||||
static HDR_FNCS: &[for<'x, 'y> fn(&mut dyn MessageField<'x>, &MessageStream<'x>); 58] = &[
|
static HDR_MAP: &[HeaderName] = &[
|
||||||
super::fields::parse_date,
|
HeaderName::Date,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_sender,
|
HeaderName::Sender,
|
||||||
super::fields::parse_subject,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_received,
|
HeaderName::Received,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_references,
|
HeaderName::References,
|
||||||
super::fields::parse_resent_date,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_cc,
|
HeaderName::Cc,
|
||||||
super::fields::parse_comments,
|
HeaderName::Comments,
|
||||||
super::fields::parse_resent_cc,
|
HeaderName::ResentCc,
|
||||||
super::fields::parse_content_id,
|
HeaderName::ContentId,
|
||||||
super::fields::parse_return_path,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_resent_message_id,
|
HeaderName::ResentMessageId,
|
||||||
super::fields::parse_resent_sender,
|
HeaderName::ReplyTo,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ResentTo,
|
||||||
super::fields::parse_resent_bcc,
|
HeaderName::ResentBcc,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ContentLanguage,
|
||||||
super::fields::parse_list_id,
|
HeaderName::Subject,
|
||||||
super::fields::parse_bcc,
|
HeaderName::ResentSender,
|
||||||
super::fields::parse_list_post,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_list_owner,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ResentDate,
|
||||||
super::fields::parse_content_type,
|
HeaderName::To,
|
||||||
super::fields::parse_keywords,
|
HeaderName::Bcc,
|
||||||
super::fields::parse_content_description,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_message_id,
|
HeaderName::ContentTransferEncoding,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ReturnPath,
|
||||||
super::fields::parse_to,
|
HeaderName::ListId,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Keywords,
|
||||||
super::fields::parse_list_subscribe,
|
HeaderName::ContentDescription,
|
||||||
super::fields::parse_content_transfer_encoding,
|
HeaderName::ListOwner,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ContentType,
|
||||||
super::fields::parse_reply_to,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_resent_to,
|
HeaderName::ListHelp,
|
||||||
super::fields::parse_no_op,
|
HeaderName::MessageId,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ContentLocation,
|
||||||
super::fields::parse_list_archive,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_content_disposition,
|
HeaderName::ListSubscribe,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_list_unsubscribe,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_list_help,
|
HeaderName::ListPost,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ResentFrom,
|
||||||
super::fields::parse_mime_version,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_from,
|
HeaderName::ContentDisposition,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_in_reply_to,
|
HeaderName::InReplyTo,
|
||||||
super::fields::parse_no_op,
|
HeaderName::ListArchive,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_no_op,
|
HeaderName::From,
|
||||||
super::fields::parse_no_op,
|
HeaderName::Unsupported,
|
||||||
super::fields::parse_resent_from,
|
HeaderName::ListUnsubscribe,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::Unsupported,
|
||||||
|
HeaderName::MimeVersion,
|
||||||
];
|
];
|
||||||
|
|
||||||
static HDR_NAMES: &[&[u8]; 58] = &[
|
static HDR_NAMES: &[&[u8]] = &[
|
||||||
b"date",
|
b"date",
|
||||||
b"",
|
b"",
|
||||||
b"sender",
|
b"sender",
|
||||||
b"subject",
|
b"",
|
||||||
b"received",
|
b"received",
|
||||||
b"",
|
b"",
|
||||||
b"references",
|
b"references",
|
||||||
b"resent-date",
|
b"",
|
||||||
b"cc",
|
b"cc",
|
||||||
b"comments",
|
b"comments",
|
||||||
b"resent-cc",
|
b"resent-cc",
|
||||||
b"content-id",
|
b"content-id",
|
||||||
b"return-path",
|
b"",
|
||||||
b"resent-message-id",
|
b"resent-message-id",
|
||||||
|
b"reply-to",
|
||||||
|
b"resent-to",
|
||||||
|
b"resent-bcc",
|
||||||
|
b"content-language",
|
||||||
|
b"subject",
|
||||||
b"resent-sender",
|
b"resent-sender",
|
||||||
b"",
|
b"",
|
||||||
b"resent-bcc",
|
|
||||||
b"",
|
b"",
|
||||||
b"list-id",
|
b"resent-date",
|
||||||
|
b"to",
|
||||||
b"bcc",
|
b"bcc",
|
||||||
b"list-post",
|
b"",
|
||||||
|
b"content-transfer-encoding",
|
||||||
|
b"return-path",
|
||||||
|
b"list-id",
|
||||||
|
b"keywords",
|
||||||
|
b"content-description",
|
||||||
b"list-owner",
|
b"list-owner",
|
||||||
b"",
|
b"",
|
||||||
b"content-type",
|
b"content-type",
|
||||||
b"keywords",
|
|
||||||
b"content-description",
|
|
||||||
b"message-id",
|
|
||||||
b"",
|
b"",
|
||||||
b"to",
|
b"list-help",
|
||||||
|
b"message-id",
|
||||||
|
b"content-location",
|
||||||
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"list-subscribe",
|
b"list-subscribe",
|
||||||
b"content-transfer-encoding",
|
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"reply-to",
|
|
||||||
b"resent-to",
|
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"list-archive",
|
b"list-post",
|
||||||
|
b"",
|
||||||
|
b"resent-from",
|
||||||
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"content-disposition",
|
b"content-disposition",
|
||||||
b"",
|
b"",
|
||||||
|
b"in-reply-to",
|
||||||
|
b"list-archive",
|
||||||
|
b"",
|
||||||
|
b"from",
|
||||||
|
b"",
|
||||||
b"list-unsubscribe",
|
b"list-unsubscribe",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"list-help",
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"",
|
b"",
|
||||||
b"mime-version",
|
b"mime-version",
|
||||||
b"",
|
|
||||||
b"from",
|
|
||||||
b"",
|
|
||||||
b"in-reply-to",
|
|
||||||
b"",
|
|
||||||
b"",
|
|
||||||
b"",
|
|
||||||
b"",
|
|
||||||
b"resent-from",
|
|
||||||
];
|
];
|
||||||
|
|||||||
+153
-105
@@ -13,15 +13,20 @@ use std::borrow::Cow;
|
|||||||
|
|
||||||
use crate::{
|
use crate::{
|
||||||
decoders::{
|
decoders::{
|
||||||
base64::Base64Decoder,
|
base64::decode_base64,
|
||||||
charsets::map::get_charset_decoder,
|
charsets::map::get_charset_decoder,
|
||||||
html::{html_to_text, text_to_html},
|
html::{html_to_text, text_to_html},
|
||||||
quoted_printable::QuotedPrintableDecoder,
|
quoted_printable::decode_quoted_printable,
|
||||||
|
DecodeFnc, DecodeResult,
|
||||||
},
|
},
|
||||||
BinaryPart, ContentType, InlinePart, Message, MessageHeader, MessagePart, MimeHeader, TextPart,
|
BinaryPart, ContentType, HeaderName, HeaderValue, Headers, InlinePart, Message, MessagePart,
|
||||||
|
TextPart,
|
||||||
};
|
};
|
||||||
|
|
||||||
use super::{fields::MessageField, header::parse_headers, message_stream::MessageStream};
|
use super::{
|
||||||
|
header::parse_headers,
|
||||||
|
mime::{get_bytes_to_boundary, seek_next_part, skip_crlf, skip_multipart_end},
|
||||||
|
};
|
||||||
|
|
||||||
#[derive(Debug, PartialEq)]
|
#[derive(Debug, PartialEq)]
|
||||||
enum MimeType {
|
enum MimeType {
|
||||||
@@ -37,19 +42,36 @@ enum MimeType {
|
|||||||
Other,
|
Other,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
fn result_to_string<'x>(
|
||||||
fn bytes_to_string<'x>(bytes: Cow<'x, [u8]>, content_type: Option<&ContentType>) -> Cow<'x, str> {
|
result: DecodeResult,
|
||||||
if let Some(content_type) = content_type {
|
data: &'x [u8],
|
||||||
if let Some(charset) = content_type.get_attribute("charset") {
|
content_type: Option<&ContentType>,
|
||||||
if let Some(decoder_fnc) = get_charset_decoder(charset.as_bytes()) {
|
) -> Cow<'x, str> {
|
||||||
return decoder_fnc(bytes.as_ref()).into();
|
match (
|
||||||
}
|
result,
|
||||||
|
content_type.and_then(|ct| {
|
||||||
|
ct.get_attribute("charset")
|
||||||
|
.and_then(|c| get_charset_decoder(c.as_bytes()))
|
||||||
|
}),
|
||||||
|
) {
|
||||||
|
(DecodeResult::Owned(vec), Some(charset_decoder)) => charset_decoder(&vec).into(),
|
||||||
|
(DecodeResult::Owned(vec), None) => String::from_utf8(vec)
|
||||||
|
.unwrap_or_else(|e| String::from_utf8_lossy(e.as_bytes()).into_owned())
|
||||||
|
.into(),
|
||||||
|
(DecodeResult::Borrowed((from, to)), Some(charset_decoder)) => {
|
||||||
|
charset_decoder(&data[from..to]).into()
|
||||||
}
|
}
|
||||||
|
(DecodeResult::Borrowed((from, to)), None) => String::from_utf8_lossy(&data[from..to]),
|
||||||
|
(DecodeResult::Empty, _) => "\n".to_string().into(),
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
String::from_utf8(bytes.into_owned())
|
fn result_to_bytes(result: DecodeResult, data: &[u8]) -> Cow<[u8]> {
|
||||||
.unwrap_or_else(|e| String::from_utf8_lossy(e.as_bytes()).into_owned())
|
match result {
|
||||||
.into()
|
DecodeResult::Owned(vec) => Cow::Owned(vec),
|
||||||
|
DecodeResult::Borrowed((from, to)) => Cow::Borrowed(&data[from..to]),
|
||||||
|
DecodeResult::Empty => Cow::from(vec![b'?']),
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[inline(always)]
|
#[inline(always)]
|
||||||
@@ -115,28 +137,38 @@ impl MessageParserState {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub struct MessageStream<'x> {
|
||||||
|
pub data: &'x [u8],
|
||||||
|
pub pos: usize,
|
||||||
|
}
|
||||||
|
|
||||||
|
impl<'x> MessageStream<'x> {
|
||||||
|
pub fn new(data: &'x [u8]) -> MessageStream<'x> {
|
||||||
|
MessageStream { data, pos: 0 }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<'x> Message<'x> {
|
impl<'x> Message<'x> {
|
||||||
fn new() -> Message<'x> {
|
fn new() -> Message<'x> {
|
||||||
Message {
|
Message {
|
||||||
header: Box::new(MessageHeader::new()),
|
headers: Headers::new(),
|
||||||
..Default::default()
|
..Default::default()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// 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.header.is_empty()
|
self.headers.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
|
||||||
/// `Message` struct.
|
/// `Message` struct.
|
||||||
///
|
///
|
||||||
/// This function never panics, a best-effort is made to parse the message and
|
/// This function never panics, a best-effort is made to parse the message and
|
||||||
/// if no headers are found and empty `Message` struct is returned.
|
/// if no headers are found None is returned.
|
||||||
/// To make sure parsing was successfull use `is_empty()`.
|
|
||||||
///
|
///
|
||||||
pub fn parse(bytes: &'x [u8]) -> Message<'x> {
|
pub fn parse(bytes: &'x [u8]) -> Option<Message<'x>> {
|
||||||
let stream = MessageStream::new(bytes);
|
let mut stream = MessageStream::new(bytes);
|
||||||
|
|
||||||
let mut message = Message::new();
|
let mut message = Message::new();
|
||||||
let mut message_stack = Vec::new();
|
let mut message_stack = Vec::new();
|
||||||
@@ -144,34 +176,37 @@ impl<'x> Message<'x> {
|
|||||||
let mut state = MessageParserState::new();
|
let mut state = MessageParserState::new();
|
||||||
let mut state_stack = Vec::new();
|
let mut state_stack = Vec::new();
|
||||||
|
|
||||||
let mut mime_part_header = MimeHeader::new();
|
let mut mime_part_header = Headers::new();
|
||||||
|
|
||||||
'outer: loop {
|
'outer: loop {
|
||||||
// Obtain reference to either the message or the MIME part's header
|
// Obtain reference to either the message or the MIME part's header
|
||||||
let header: &mut dyn MessageField = if let MimeType::Message = state.mime_type {
|
let header = if let MimeType::Message = state.mime_type {
|
||||||
message.header.as_mut()
|
&mut message.headers
|
||||||
} else {
|
} else {
|
||||||
&mut mime_part_header
|
&mut mime_part_header
|
||||||
};
|
};
|
||||||
|
|
||||||
// Parse headers
|
// Parse headers
|
||||||
if !parse_headers(header, &stream) {
|
if !parse_headers(header, &mut stream) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
state.parts += 1;
|
state.parts += 1;
|
||||||
|
|
||||||
|
let content_type = header
|
||||||
|
.get(&HeaderName::ContentType)
|
||||||
|
.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) =
|
||||||
get_mime_type(header.get_content_type(), &state.mime_type);
|
get_mime_type(content_type, &state.mime_type);
|
||||||
|
|
||||||
if is_multipart {
|
if is_multipart {
|
||||||
if let Some(mime_boundary) = header
|
if let Some(mime_boundary) =
|
||||||
.get_content_type()
|
content_type.map_or_else(|| None, |f| f.get_attribute("boundary"))
|
||||||
.map_or_else(|| None, |f| f.get_attribute("boundary"))
|
|
||||||
{
|
{
|
||||||
let mime_boundary = ("\n--".to_string() + mime_boundary).into_bytes();
|
let mime_boundary = ("\n--".to_string() + mime_boundary).into_bytes();
|
||||||
|
|
||||||
if stream.seek_next_part(mime_boundary.as_ref()) {
|
if seek_next_part(&mut stream, mime_boundary.as_ref()) {
|
||||||
let new_state = MessageParserState {
|
let new_state = MessageParserState {
|
||||||
in_alternative: state.in_alternative
|
in_alternative: state.in_alternative
|
||||||
|| mime_type == MimeType::MultipartAlernative,
|
|| mime_type == MimeType::MultipartAlernative,
|
||||||
@@ -186,7 +221,7 @@ impl<'x> Message<'x> {
|
|||||||
mime_part_header.clear();
|
mime_part_header.clear();
|
||||||
state_stack.push(state);
|
state_stack.push(state);
|
||||||
state = new_state;
|
state = new_state;
|
||||||
stream.skip_crlf();
|
skip_crlf(&mut stream);
|
||||||
continue;
|
continue;
|
||||||
} else {
|
} else {
|
||||||
mime_type = MimeType::TextOther;
|
mime_type = MimeType::TextOther;
|
||||||
@@ -209,79 +244,90 @@ impl<'x> Message<'x> {
|
|||||||
state_stack.push(state);
|
state_stack.push(state);
|
||||||
message = Message::new();
|
message = Message::new();
|
||||||
state = new_state;
|
state = new_state;
|
||||||
stream.skip_crlf();
|
skip_crlf(&mut stream);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
stream.skip_crlf();
|
skip_crlf(&mut stream);
|
||||||
|
|
||||||
let (success, mut bytes) = match header.get_content_transfer_encoding() {
|
let (is_binary, decode_fnc): (bool, DecodeFnc) = match header
|
||||||
Some(encoding) if encoding.eq_ignore_ascii_case("base64") => stream.decode_base64(
|
.get(&HeaderName::ContentTransferEncoding)
|
||||||
state
|
{
|
||||||
.mime_boundary
|
Some(HeaderValue::Text(encoding)) if encoding.eq_ignore_ascii_case("base64") => {
|
||||||
.as_ref()
|
(false, decode_base64)
|
||||||
.map_or_else(|| &[][..], |b| &b[..]),
|
}
|
||||||
false,
|
Some(HeaderValue::Text(encoding))
|
||||||
),
|
if encoding.eq_ignore_ascii_case("quoted-printable") =>
|
||||||
Some(encoding) if encoding.eq_ignore_ascii_case("quoted-printable") => stream
|
{
|
||||||
.decode_quoted_printable(
|
(false, decode_quoted_printable)
|
||||||
|
}
|
||||||
|
_ => (true, get_bytes_to_boundary),
|
||||||
|
};
|
||||||
|
|
||||||
|
let (bytes_read, mut bytes) = decode_fnc(
|
||||||
|
&stream,
|
||||||
|
stream.pos,
|
||||||
|
state
|
||||||
|
.mime_boundary
|
||||||
|
.as_ref()
|
||||||
|
.map_or_else(|| &[][..], |b| &b[..]),
|
||||||
|
false,
|
||||||
|
);
|
||||||
|
|
||||||
|
// Attempt to recover contents of an invalid message
|
||||||
|
if bytes_read == 0 {
|
||||||
|
if stream.pos >= stream.data.len() || (is_binary && state.mime_boundary.is_none()) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
|
||||||
|
// Get raw MIME part
|
||||||
|
let (bytes_read, r_bytes) = if !is_binary {
|
||||||
|
get_bytes_to_boundary(
|
||||||
|
&stream,
|
||||||
|
stream.pos,
|
||||||
state
|
state
|
||||||
.mime_boundary
|
.mime_boundary
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.map_or_else(|| &[][..], |b| &b[..]),
|
.map_or_else(|| &[][..], |b| &b[..]),
|
||||||
false,
|
false,
|
||||||
),
|
)
|
||||||
_ => stream.get_bytes_to_boundary(
|
} else {
|
||||||
state
|
(0, DecodeResult::Empty)
|
||||||
.mime_boundary
|
};
|
||||||
.as_ref()
|
|
||||||
.map_or_else(|| &[][..], |b| &b[..]),
|
|
||||||
),
|
|
||||||
};
|
|
||||||
|
|
||||||
// Attempt to recover contents of an invalid message
|
if bytes_read == 0 {
|
||||||
if !success {
|
// If there is MIME boundary, ignore it and get raw message
|
||||||
if !stream.is_eof() {
|
if state.mime_boundary.is_some() {
|
||||||
// Get raw MIME part
|
let (bytes_read, r_bytes) =
|
||||||
let (success, r_bytes) = stream.get_bytes_to_boundary(
|
get_bytes_to_boundary(&stream, stream.pos, &[][..], false);
|
||||||
state
|
if bytes_read > 0 {
|
||||||
.mime_boundary
|
bytes = r_bytes;
|
||||||
.as_ref()
|
stream.pos += bytes_read;
|
||||||
.map_or_else(|| &[][..], |b| &b[..]),
|
|
||||||
);
|
|
||||||
if !success {
|
|
||||||
// If there is MIME boundary, ignore it and get raw message
|
|
||||||
if !stream.is_eof() && state.mime_boundary.is_some() {
|
|
||||||
let (_, r_bytes) = stream.get_bytes_to_boundary(&[][..]);
|
|
||||||
if r_bytes.is_some() {
|
|
||||||
bytes = r_bytes;
|
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
bytes = r_bytes;
|
break;
|
||||||
}
|
}
|
||||||
mime_type = MimeType::TextOther;
|
} else {
|
||||||
is_inline = false;
|
bytes = r_bytes;
|
||||||
is_text = true;
|
stream.pos += bytes_read;
|
||||||
} else if bytes.is_none() {
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
|
mime_type = MimeType::TextOther;
|
||||||
|
is_inline = false;
|
||||||
|
is_text = true;
|
||||||
|
} else {
|
||||||
|
stream.pos += bytes_read;
|
||||||
}
|
}
|
||||||
|
|
||||||
let is_inline = is_inline
|
let is_inline = is_inline
|
||||||
&& header
|
&& header
|
||||||
.get_content_disposition()
|
.get(&HeaderName::ContentDisposition)
|
||||||
.map_or_else(|| true, |d| !d.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
|
||||||
&& (mime_type == MimeType::Inline
|
&& (mime_type == MimeType::Inline
|
||||||
|| header
|
|| content_type.map_or_else(|| true, |c| !c.has_attribute("name")))));
|
||||||
.get_content_type()
|
|
||||||
.map_or_else(|| true, |c| !c.has_attribute("name")))));
|
|
||||||
|
|
||||||
let (add_to_html, add_to_text) = if let MimeType::MultipartAlernative = state.mime_type
|
let (add_to_html, add_to_text) = if let MimeType::MultipartAlernative = state.mime_type
|
||||||
{
|
{
|
||||||
@@ -309,11 +355,8 @@ impl<'x> Message<'x> {
|
|||||||
|
|
||||||
if is_text {
|
if is_text {
|
||||||
let text_part = TextPart {
|
let text_part = TextPart {
|
||||||
contents: bytes_to_string(
|
contents: result_to_string(bytes, stream.data, content_type),
|
||||||
bytes.unwrap_or_else(|| vec![b'\n'].into()),
|
headers: if !mime_part_header.is_empty() {
|
||||||
header.get_content_type(),
|
|
||||||
),
|
|
||||||
header: if !mime_part_header.is_empty() {
|
|
||||||
Some(std::mem::take(&mut mime_part_header))
|
Some(std::mem::take(&mut mime_part_header))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
@@ -324,12 +367,12 @@ impl<'x> Message<'x> {
|
|||||||
|
|
||||||
if add_to_html && !is_html {
|
if add_to_html && !is_html {
|
||||||
message.html_body.push(InlinePart::Text(TextPart {
|
message.html_body.push(InlinePart::Text(TextPart {
|
||||||
header: None,
|
headers: None,
|
||||||
contents: text_to_html(&text_part.contents).into(),
|
contents: text_to_html(&text_part.contents).into(),
|
||||||
}));
|
}));
|
||||||
} else if add_to_text && is_html {
|
} else if add_to_text && is_html {
|
||||||
message.text_body.push(InlinePart::Text(TextPart {
|
message.text_body.push(InlinePart::Text(TextPart {
|
||||||
header: None,
|
headers: None,
|
||||||
contents: html_to_text(&text_part.contents).into(),
|
contents: html_to_text(&text_part.contents).into(),
|
||||||
}));
|
}));
|
||||||
}
|
}
|
||||||
@@ -343,12 +386,12 @@ impl<'x> Message<'x> {
|
|||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let binary_part = BinaryPart {
|
let binary_part = BinaryPart {
|
||||||
header: if !mime_part_header.is_empty() {
|
headers: if !mime_part_header.is_empty() {
|
||||||
Some(std::mem::take(&mut mime_part_header))
|
Some(std::mem::take(&mut mime_part_header))
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
},
|
},
|
||||||
contents: bytes.unwrap_or_else(|| Cow::from(vec![b'?'])),
|
contents: result_to_bytes(bytes, stream.data),
|
||||||
};
|
};
|
||||||
|
|
||||||
if add_to_html {
|
if add_to_html {
|
||||||
@@ -388,7 +431,7 @@ impl<'x> Message<'x> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if stream.skip_multipart_end() {
|
if skip_multipart_end(&mut stream) {
|
||||||
// End of MIME part reached
|
// End of MIME part reached
|
||||||
|
|
||||||
if MimeType::MultipartAlernative == state.mime_type
|
if MimeType::MultipartAlernative == state.mime_type
|
||||||
@@ -402,7 +445,7 @@ impl<'x> Message<'x> {
|
|||||||
for part in message.html_body[state.html_parts..].iter() {
|
for part in message.html_body[state.html_parts..].iter() {
|
||||||
message.text_body.push(match part {
|
message.text_body.push(match part {
|
||||||
InlinePart::Text(part) => InlinePart::Text(TextPart {
|
InlinePart::Text(part) => InlinePart::Text(TextPart {
|
||||||
header: None,
|
headers: None,
|
||||||
contents: html_to_text(&part.contents).into(),
|
contents: html_to_text(&part.contents).into(),
|
||||||
}),
|
}),
|
||||||
InlinePart::InlineBinary(index) => {
|
InlinePart::InlineBinary(index) => {
|
||||||
@@ -419,7 +462,7 @@ impl<'x> Message<'x> {
|
|||||||
for part in message.text_body[state.text_parts..].iter() {
|
for part in message.text_body[state.text_parts..].iter() {
|
||||||
message.html_body.push(match part {
|
message.html_body.push(match part {
|
||||||
InlinePart::Text(part) => InlinePart::Text(TextPart {
|
InlinePart::Text(part) => InlinePart::Text(TextPart {
|
||||||
header: None,
|
headers: None,
|
||||||
contents: text_to_html(&part.contents).into(),
|
contents: text_to_html(&part.contents).into(),
|
||||||
}),
|
}),
|
||||||
InlinePart::InlineBinary(index) => {
|
InlinePart::InlineBinary(index) => {
|
||||||
@@ -436,29 +479,35 @@ impl<'x> Message<'x> {
|
|||||||
|
|
||||||
if let Some(ref mime_boundary) = state.mime_boundary {
|
if let Some(ref mime_boundary) = state.mime_boundary {
|
||||||
// Ancestor has a MIME boundary, seek it.
|
// Ancestor has a MIME boundary, seek it.
|
||||||
if stream.seek_next_part(mime_boundary) {
|
if seek_next_part(&mut stream, mime_boundary) {
|
||||||
continue 'inner;
|
continue 'inner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
break 'outer;
|
break 'outer;
|
||||||
} else {
|
} else {
|
||||||
stream.skip_crlf();
|
skip_crlf(&mut stream);
|
||||||
// Headers of next part expected next, break inner look.
|
// Headers of next part expected next, break inner look.
|
||||||
break 'inner;
|
break 'inner;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if stream.is_eof() {
|
} else if stream.pos >= stream.data.len() {
|
||||||
break 'outer;
|
break 'outer;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
while let Some(mut prev_message) = message_stack.pop() {
|
while let Some(mut prev_message) = message_stack.pop() {
|
||||||
prev_message.attachments.push(MessagePart::Message(message));
|
if !message.is_empty() {
|
||||||
|
prev_message.attachments.push(MessagePart::Message(message));
|
||||||
|
}
|
||||||
message = prev_message;
|
message = prev_message;
|
||||||
}
|
}
|
||||||
|
|
||||||
message
|
if !message.is_empty() {
|
||||||
|
Some(message)
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#[cfg(test)]
|
#[cfg(test)]
|
||||||
@@ -500,9 +549,7 @@ mod tests {
|
|||||||
tests_run += 1;
|
tests_run += 1;
|
||||||
|
|
||||||
let input = input.split_at_mut(pos);
|
let input = input.split_at_mut(pos);
|
||||||
let message = Message::parse(input.0);
|
let message = Message::parse(input.0).unwrap();
|
||||||
|
|
||||||
assert!(!message.is_empty());
|
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message,
|
message,
|
||||||
@@ -522,26 +569,27 @@ mod tests {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*#[test]
|
/*
|
||||||
|
#[test]
|
||||||
fn generate_test_samples() {
|
fn generate_test_samples() {
|
||||||
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes();
|
const SEPARATOR: &[u8] = "\n---- EXPECTED STRUCTURE ----\n".as_bytes();
|
||||||
|
|
||||||
for test_suite in ["malformed" /*"legacy","malformed"*/] {
|
for test_suite in ["malformed", "legacy", "rfc", "thirdparty"] {
|
||||||
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
let mut test_dir = PathBuf::from(env!("CARGO_MANIFEST_DIR"));
|
||||||
test_dir.push("tests");
|
test_dir.push("tests");
|
||||||
test_dir.push(test_suite);
|
test_dir.push(test_suite);
|
||||||
|
|
||||||
for file_name in fs::read_dir(test_dir).unwrap() {
|
for file_name in fs::read_dir(test_dir).unwrap() {
|
||||||
/*if !file_name
|
if file_name
|
||||||
.as_ref()
|
.as_ref()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.path()
|
.path()
|
||||||
.to_str()
|
.to_str()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.contains("001")
|
.contains("COPYING")
|
||||||
{
|
{
|
||||||
continue;
|
continue;
|
||||||
}*/
|
}
|
||||||
|
|
||||||
let mut input = fs::read(file_name.as_ref().unwrap().path()).unwrap();
|
let mut input = fs::read(file_name.as_ref().unwrap().path()).unwrap();
|
||||||
let mut pos = 0;
|
let mut pos = 0;
|
||||||
|
|||||||
@@ -1,206 +0,0 @@
|
|||||||
/*
|
|
||||||
* 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, cell::Cell};
|
|
||||||
|
|
||||||
pub struct MessageStream<'x> {
|
|
||||||
pub data: &'x [u8],
|
|
||||||
pub pos: Cell<usize>,
|
|
||||||
}
|
|
||||||
|
|
||||||
impl<'x> MessageStream<'x> {
|
|
||||||
pub fn new(data: &'x [u8]) -> MessageStream<'x> {
|
|
||||||
MessageStream {
|
|
||||||
data,
|
|
||||||
pos: 0.into(),
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn get_bytes(&self, from: usize, to: usize) -> Option<&'x [u8]> {
|
|
||||||
self.data.get(from..to)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_string(&self, from: usize, to: usize) -> Option<Cow<'x, str>> {
|
|
||||||
String::from_utf8_lossy(self.data.get(from..to)?).into()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn is_eof(&self) -> bool {
|
|
||||||
self.pos.get() >= self.data.len()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn set_pos(&self, pos: usize) {
|
|
||||||
self.pos.set(pos);
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn get_pos(&self) -> usize {
|
|
||||||
self.pos.get()
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn next(&self) -> Option<&'x u8> {
|
|
||||||
let pos = self.pos.get();
|
|
||||||
let result = self.data.get(pos);
|
|
||||||
self.pos.set(pos + 1);
|
|
||||||
result
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn peek(&self) -> Option<&'x u8> {
|
|
||||||
self.data.get(self.pos.get())
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn advance(&self, pos: usize) {
|
|
||||||
self.pos.set(self.pos.get() + pos)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn seek_next_part(&self, boundary: &[u8]) -> bool {
|
|
||||||
if !boundary.is_empty() {
|
|
||||||
let mut pos = self.pos.get();
|
|
||||||
|
|
||||||
let mut match_count = 0;
|
|
||||||
|
|
||||||
for ch in self.data[pos..].iter() {
|
|
||||||
pos += 1;
|
|
||||||
|
|
||||||
if ch == &boundary[match_count] {
|
|
||||||
match_count += 1;
|
|
||||||
if match_count == boundary.len() {
|
|
||||||
self.pos.set(pos);
|
|
||||||
return true;
|
|
||||||
} else {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
} else if match_count > 0 {
|
|
||||||
if ch == &boundary[0] {
|
|
||||||
match_count = 1;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
match_count = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
false
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn get_bytes_to_boundary(&self, boundary: &[u8]) -> (bool, Option<Cow<'x, [u8]>>) {
|
|
||||||
let mut pos = self.pos.get();
|
|
||||||
|
|
||||||
let start_pos = pos;
|
|
||||||
|
|
||||||
return if !boundary.is_empty() {
|
|
||||||
let mut match_count = 0;
|
|
||||||
|
|
||||||
for ch in self.data[pos..].iter() {
|
|
||||||
pos += 1;
|
|
||||||
|
|
||||||
if ch == &boundary[match_count] {
|
|
||||||
match_count += 1;
|
|
||||||
if match_count == boundary.len() {
|
|
||||||
if self.is_boundary_end(pos) {
|
|
||||||
let match_pos = pos - match_count;
|
|
||||||
self.pos.set(pos);
|
|
||||||
|
|
||||||
return (
|
|
||||||
true,
|
|
||||||
if start_pos < match_pos {
|
|
||||||
Cow::from(&self.data[start_pos..match_pos]).into()
|
|
||||||
} else {
|
|
||||||
None
|
|
||||||
},
|
|
||||||
);
|
|
||||||
} else {
|
|
||||||
match_count = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
continue;
|
|
||||||
} else if match_count > 0 {
|
|
||||||
if ch == &boundary[0] {
|
|
||||||
match_count = 1;
|
|
||||||
continue;
|
|
||||||
} else {
|
|
||||||
match_count = 0;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
(false, None)
|
|
||||||
} else if pos < self.data.len() {
|
|
||||||
self.pos.set(self.data.len());
|
|
||||||
(true, Cow::from(&self.data[start_pos..]).into())
|
|
||||||
} else {
|
|
||||||
(false, None)
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn skip_crlf(&self) {
|
|
||||||
let mut pos = self.pos.get();
|
|
||||||
|
|
||||||
for ch in self.data[pos..].iter() {
|
|
||||||
match ch {
|
|
||||||
b'\r' | b' ' | b'\t' => pos += 1,
|
|
||||||
b'\n' => {
|
|
||||||
self.pos.set(pos + 1);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
_ => break,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn skip_byte(&self, ch: &u8) -> bool {
|
|
||||||
let pos = self.pos.get();
|
|
||||||
|
|
||||||
if self.data.get(pos) == Some(ch) {
|
|
||||||
self.pos.set(pos + 1);
|
|
||||||
true
|
|
||||||
} else {
|
|
||||||
false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#[inline(always)]
|
|
||||||
pub fn is_boundary_end(&self, pos: usize) -> bool {
|
|
||||||
matches!(
|
|
||||||
self.data.get(pos..),
|
|
||||||
Some([b'\n' | b'\r' | b' ' | b'\t', ..]) | Some([b'-', b'-', ..]) | Some([]) | None
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn skip_multipart_end(&self) -> bool {
|
|
||||||
let pos = self.pos.get();
|
|
||||||
|
|
||||||
match self.data.get(pos..pos + 2) {
|
|
||||||
Some(b"--") => {
|
|
||||||
if let Some(byte) = self.data.get(pos + 2) {
|
|
||||||
if !(*byte).is_ascii_whitespace() {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
self.pos.set(pos + 2);
|
|
||||||
true
|
|
||||||
}
|
|
||||||
_ => false,
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pub fn rewind(&self, r: usize) {
|
|
||||||
self.pos.set(self.pos.get() - r);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
@@ -0,0 +1,136 @@
|
|||||||
|
/*
|
||||||
|
* 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 crate::decoders::DecodeResult;
|
||||||
|
|
||||||
|
use super::message::MessageStream;
|
||||||
|
|
||||||
|
pub fn seek_next_part(stream: &mut MessageStream, boundary: &[u8]) -> bool {
|
||||||
|
if !boundary.is_empty() {
|
||||||
|
let mut pos = stream.pos;
|
||||||
|
|
||||||
|
let mut match_count = 0;
|
||||||
|
|
||||||
|
for ch in stream.data[pos..].iter() {
|
||||||
|
pos += 1;
|
||||||
|
|
||||||
|
if ch == &boundary[match_count] {
|
||||||
|
match_count += 1;
|
||||||
|
if match_count == boundary.len() {
|
||||||
|
stream.pos = pos;
|
||||||
|
return true;
|
||||||
|
} else {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
} else if match_count > 0 {
|
||||||
|
if ch == &boundary[0] {
|
||||||
|
match_count = 1;
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
match_count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
false
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn get_bytes_to_boundary<'x>(
|
||||||
|
stream: &MessageStream<'x>,
|
||||||
|
start_pos: usize,
|
||||||
|
boundary: &[u8],
|
||||||
|
_is_word: bool,
|
||||||
|
) -> (usize, DecodeResult) {
|
||||||
|
let mut read_pos = start_pos;
|
||||||
|
|
||||||
|
return if !boundary.is_empty() {
|
||||||
|
let mut match_count = 0;
|
||||||
|
|
||||||
|
for ch in stream.data[read_pos..].iter() {
|
||||||
|
read_pos += 1;
|
||||||
|
|
||||||
|
if ch == &boundary[match_count] {
|
||||||
|
match_count += 1;
|
||||||
|
if match_count == boundary.len() {
|
||||||
|
if is_boundary_end(stream, read_pos) {
|
||||||
|
let match_pos = read_pos - match_count;
|
||||||
|
|
||||||
|
return (
|
||||||
|
read_pos - start_pos,
|
||||||
|
if start_pos < match_pos {
|
||||||
|
DecodeResult::Borrowed((start_pos, match_pos))
|
||||||
|
} else {
|
||||||
|
DecodeResult::Empty
|
||||||
|
},
|
||||||
|
);
|
||||||
|
} else {
|
||||||
|
match_count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
continue;
|
||||||
|
} else if match_count > 0 {
|
||||||
|
if ch == &boundary[0] {
|
||||||
|
match_count = 1;
|
||||||
|
continue;
|
||||||
|
} else {
|
||||||
|
match_count = 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
(0, DecodeResult::Empty)
|
||||||
|
} else if start_pos < stream.data.len() {
|
||||||
|
(
|
||||||
|
stream.data.len() - start_pos,
|
||||||
|
DecodeResult::Borrowed((start_pos, stream.data.len())),
|
||||||
|
)
|
||||||
|
} else {
|
||||||
|
(0, DecodeResult::Empty)
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn is_boundary_end(stream: &MessageStream, pos: usize) -> bool {
|
||||||
|
matches!(
|
||||||
|
stream.data.get(pos..),
|
||||||
|
Some([b'\n' | b'\r' | b' ' | b'\t', ..]) | Some([b'-', b'-', ..]) | Some([]) | None
|
||||||
|
)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn skip_multipart_end(stream: &mut MessageStream) -> bool {
|
||||||
|
match stream.data.get(stream.pos..stream.pos + 2) {
|
||||||
|
Some(b"--") => {
|
||||||
|
if let Some(byte) = stream.data.get(stream.pos + 2) {
|
||||||
|
if !(*byte).is_ascii_whitespace() {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stream.pos += 2;
|
||||||
|
true
|
||||||
|
}
|
||||||
|
_ => false,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
#[inline(always)]
|
||||||
|
pub fn skip_crlf(stream: &mut MessageStream) {
|
||||||
|
for ch in stream.data[stream.pos..].iter() {
|
||||||
|
match ch {
|
||||||
|
b'\r' | b' ' | b'\t' => stream.pos += 1,
|
||||||
|
b'\n' => {
|
||||||
|
stream.pos += 1;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
_ => break,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
+1
-1
@@ -12,4 +12,4 @@
|
|||||||
pub mod fields;
|
pub mod fields;
|
||||||
pub mod header;
|
pub mod header;
|
||||||
pub mod message;
|
pub mod message;
|
||||||
pub mod message_stream;
|
pub mod mime;
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ use mail_parser::*;
|
|||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn test_api() {
|
fn test_api() {
|
||||||
let mut input = concat!(
|
let input = concat!(
|
||||||
"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)\n",
|
"From: Art Vandelay <art@vandelay.com> (Vandelay Industries)\n",
|
||||||
"To: \"Colleagues\": \"James Smythe\" <james@vandelay.com>; Friends:\n",
|
"To: \"Colleagues\": \"James Smythe\" <james@vandelay.com>; Friends:\n",
|
||||||
" jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;\n",
|
" jane@example.com, =?UTF-8?Q?John_Sm=C3=AEth?= <john@example.com>;\n",
|
||||||
@@ -48,21 +48,20 @@ fn test_api() {
|
|||||||
"--giddyup--\n",
|
"--giddyup--\n",
|
||||||
"--festivus--\n",
|
"--festivus--\n",
|
||||||
)
|
)
|
||||||
.as_bytes()
|
.as_bytes();
|
||||||
.to_vec();
|
|
||||||
|
|
||||||
let message = Message::parse(&mut input[..]);
|
let message = Message::parse(input).unwrap();
|
||||||
|
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_from(),
|
message.get_from(),
|
||||||
&Address::Address(Addr {
|
&HeaderValue::Address(Addr {
|
||||||
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
name: Some("Art Vandelay (Vandelay Industries)".into()),
|
||||||
address: Some("art@vandelay.com".into())
|
address: Some("art@vandelay.com".into())
|
||||||
})
|
})
|
||||||
);
|
);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
message.get_to(),
|
message.get_to(),
|
||||||
&Address::GroupList(vec![
|
&HeaderValue::GroupList(vec![
|
||||||
Group {
|
Group {
|
||||||
name: Some("Colleagues".into()),
|
name: Some("Colleagues".into()),
|
||||||
addresses: vec![Addr {
|
addresses: vec![Addr {
|
||||||
@@ -132,8 +131,6 @@ fn test_api() {
|
|||||||
assert_eq!(nested_attachment.len(), 42);
|
assert_eq!(nested_attachment.len(), 42);
|
||||||
assert_eq!(
|
assert_eq!(
|
||||||
nested_attachment
|
nested_attachment
|
||||||
.get_header()
|
|
||||||
.unwrap()
|
|
||||||
.get_content_type()
|
.get_content_type()
|
||||||
.unwrap()
|
.unwrap()
|
||||||
.get_attribute("name")
|
.get_attribute("name")
|
||||||
|
|||||||
+39
-42
@@ -44,17 +44,33 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 35,
|
"hour": 19,
|
||||||
"second": 5,
|
"minute": 35,
|
||||||
"tz_before_gmt": true,
|
"second": 5,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -62,45 +78,26 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_disposition": {
|
"mime_version": {
|
||||||
"c_type": "attachment",
|
"Text": "1.0"
|
||||||
"attributes": {
|
|
||||||
"filename": "redball.png"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"message_id": {
|
||||||
"content_type": {
|
"Text": "NDBBIAKOPKHFGPLCODIGKEKECHAA.doug@example.com"
|
||||||
"c_type": "image",
|
|
||||||
"c_subtype": "png",
|
|
||||||
"attributes": {
|
|
||||||
"name": "redball.png"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
|||||||
+70
-75
@@ -1,61 +1,47 @@
|
|||||||
From: "Doug Sauder" <doug@example.com>
|
From: "Doug Sauder" <doug@example.com>
|
||||||
To: "Joe Blow" <jblow@example.com>,
|
To: "Joe Blow" <jblow@example.com>,
|
||||||
=?utf-7?B?SitBUHctcmdlbiBTY2htK0FQdy1yZ2Vu?= <schmuergen@example.com>
|
=?utf-7?B?SitBUHctcmdlbiBTY2htK0FQdy1yZ2Vu?= <schmuergen@example.com>
|
||||||
Subject: =?utf-7?Q?Die_Hasen_und_die_Fr+APY-sche_=28Microsoft_Outlook_00=29?=
|
Subject: =?utf-7?Q?Die_Hasen_und_die_Fr+APY-sche_=28Microsoft_Outlook_00=29?=
|
||||||
Date: Wed, 17 May 2000 19:18:39 -0400
|
Date: Wed, 17 May 2000 19:18:39 -0400
|
||||||
Message-ID: <NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com>
|
Message-ID: <NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com>
|
||||||
MIME-Version: 1.0
|
MIME-Version: 1.0
|
||||||
Content-Type: text/plain;
|
Content-Type: text/plain;
|
||||||
charset="utf-7"
|
charset="utf-7"
|
||||||
Content-Transfer-Encoding: quoted-printable
|
Content-Transfer-Encoding: quoted-printable
|
||||||
X-Priority: 3 (Normal)
|
X-Priority: 3 (Normal)
|
||||||
X-MSMail-Priority: Normal
|
X-MSMail-Priority: Normal
|
||||||
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
|
X-Mailer: Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)
|
||||||
Importance: Normal
|
Importance: Normal
|
||||||
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
|
X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2314.1300
|
||||||
|
|
||||||
Die Hasen und die Fr+APY-sche
|
Die Hasen und die Fr+APY-sche
|
||||||
|
|
||||||
Die Hasen klagten einst +APw-ber ihre mi+AN8-liche Lage+ADs- +ACI-wir =
|
Die Hasen klagten einst +APw-ber ihre mi+AN8-liche Lage+ADs- +ACI-wir =
|
||||||
leben+ACI-, sprach ein Redner, +ACI-in steter Furcht vor Menschen und =
|
leben+ACI-, sprach ein Redner, +ACI-in steter Furcht vor Menschen und =
|
||||||
Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere+ACE- =
|
Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere+ACE- =
|
||||||
Unsere stete Angst ist +AOQ-rger als der Tod selbst. Auf, la+AN8-t uns =
|
Unsere stete Angst ist +AOQ-rger als der Tod selbst. Auf, la+AN8-t uns =
|
||||||
ein f+APw-r allemal sterben.+ACI-=20
|
ein f+APw-r allemal sterben.+ACI-=20
|
||||||
|
|
||||||
In einem nahen Teich wollten sie sich nun ers+AOQ-ufen+ADs- sie eilten =
|
In einem nahen Teich wollten sie sich nun ers+AOQ-ufen+ADs- sie eilten =
|
||||||
ihm zu+ADs- allein das au+AN8-erordentliche Get+APY-se und ihre =
|
ihm zu+ADs- allein das au+AN8-erordentliche Get+APY-se und ihre =
|
||||||
wunderbare Gestalt erschreckte eine Menge Fr+APY-sche, die am Ufer =
|
wunderbare Gestalt erschreckte eine Menge Fr+APY-sche, die am Ufer =
|
||||||
sa+AN8-en, so sehr, da+AN8- sie aufs schnellste untertauchten.=20
|
sa+AN8-en, so sehr, da+AN8- sie aufs schnellste untertauchten.=20
|
||||||
|
|
||||||
+ACI-Halt+ACI-, rief nun eben dieser Sprecher, +ACI-wir wollen das =
|
+ACI-Halt+ACI-, rief nun eben dieser Sprecher, +ACI-wir wollen das =
|
||||||
Ers+AOQ-ufen noch ein wenig aufschieben, denn auch uns f+APw-rchten, wie =
|
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 ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"mime_version": {
|
||||||
"year": 2000,
|
"Text": "1.0"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 18,
|
|
||||||
"second": 39,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"subject": {
|
||||||
"Address": {
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
"name": "Doug Sauder",
|
|
||||||
"address": "doug@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
|
||||||
"to": {
|
"to": {
|
||||||
"AddressList": [
|
"AddressList": [
|
||||||
{
|
{
|
||||||
@@ -68,30 +54,39 @@ m+APw-ssen als wir.+ACI-=20
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "quoted-printable"
|
||||||
"c_type": "text",
|
},
|
||||||
"c_subtype": "plain",
|
"from": {
|
||||||
"attributes": {
|
"Address": {
|
||||||
"charset": "utf-7"
|
"name": "Doug Sauder",
|
||||||
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"date": {
|
||||||
"X-Priority": [
|
"DateTime": {
|
||||||
"3 (Normal)"
|
"year": 2000,
|
||||||
],
|
"month": 5,
|
||||||
"X-MimeOLE": [
|
"day": 17,
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
"hour": 19,
|
||||||
],
|
"minute": 18,
|
||||||
"X-MSMail-Priority": [
|
"second": 39,
|
||||||
"Normal"
|
"tz_before_gmt": true,
|
||||||
],
|
"tz_hour": 4,
|
||||||
"Importance": [
|
"tz_minute": 0
|
||||||
"Normal"
|
}
|
||||||
],
|
},
|
||||||
"X-Mailer": [
|
"content_type": {
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
"ContentType": {
|
||||||
]
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "utf-7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGMEKCCHAA.doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+33
-32
@@ -37,17 +37,25 @@ wir." <br>
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003052.00a89c40@pop.example.com"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 31,
|
"hour": 0,
|
||||||
"second": 0,
|
"minute": 31,
|
||||||
"tz_before_gmt": true,
|
"second": 0,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -55,33 +63,26 @@ wir." <br>
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003052.00a89c40@pop.example.com",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"c_type": "text",
|
||||||
|
"c_subtype": "html",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "html",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+51
-44
@@ -64,17 +64,12 @@ wir." <br>
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"message_id": {
|
||||||
"year": 2000,
|
"Text": "4.2.0.58.20000519002557.00a88870@pop.example.com"
|
||||||
"month": 5,
|
},
|
||||||
"day": 19,
|
"subject": {
|
||||||
"hour": 0,
|
"Text": "Die Hasen und die Frösche"
|
||||||
"minute": 29,
|
|
||||||
"second": 55,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -82,44 +77,52 @@ wir." <br>
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519002557.00a88870@pop.example.com",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_714967308==_.ALT"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 29,
|
||||||
|
"second": 55,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "alternative",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "=====================_714967308==_.ALT"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<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; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <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"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <br>\n<br>\n</font></html>\n"
|
"contents": "<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; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <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"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <br>\n<br>\n</font></html>\n"
|
||||||
@@ -127,14 +130,18 @@ wir." <br>
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||||
|
|||||||
+34
-35
@@ -19,17 +19,27 @@ Slow but steady wins the race.
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"to": {
|
||||||
"year": 2000,
|
"Address": {
|
||||||
"month": 5,
|
"name": "Joe Blow",
|
||||||
"day": 19,
|
"address": "blow@example.com"
|
||||||
"hour": 1,
|
}
|
||||||
"minute": 13,
|
},
|
||||||
"second": 19,
|
"mime_version": {
|
||||||
"tz_before_gmt": true,
|
"Text": "1.0"
|
||||||
"tz_hour": 4,
|
},
|
||||||
"tz_minute": 0
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "The Hare and the Tortoise"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -37,32 +47,21 @@ Slow but steady wins the race.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519011207.00a8cd70@pop.example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "The Hare and the Tortoise",
|
"year": 2000,
|
||||||
"to": {
|
"month": 5,
|
||||||
"Address": {
|
"day": 19,
|
||||||
"name": "Joe Blow",
|
"hour": 1,
|
||||||
"address": "blow@example.com"
|
"minute": 13,
|
||||||
|
"second": 19,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"message_id": {
|
||||||
"c_type": "text",
|
"Text": "4.2.0.58.20000519011207.00a8cd70@pop.example.com"
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "us-ascii"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Priority": [
|
|
||||||
"5 (Lowest)"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+36
-41
@@ -33,17 +33,37 @@ m+APw-ssen als wir.+ACI-=20
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 20,
|
"hour": 19,
|
||||||
"second": 24,
|
"minute": 20,
|
||||||
"tz_before_gmt": true,
|
"second": 24,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -51,39 +71,14 @@ m+APw-ssen als wir.+ACI-=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGCEKDCHAA.doug@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "utf-7"
|
"attributes": {
|
||||||
|
"charset": "utf-7"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+61
-56
@@ -84,17 +84,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"subject": {
|
||||||
"year": 2000,
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"month": 5,
|
},
|
||||||
"day": 17,
|
"mime_version": {
|
||||||
"hour": 19,
|
"Text": "1.0"
|
||||||
"minute": 36,
|
},
|
||||||
"second": 13,
|
"content_type": {
|
||||||
"tz_before_gmt": true,
|
"ContentType": {
|
||||||
"tz_hour": 4,
|
"c_type": "multipart",
|
||||||
"tz_minute": 0
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -102,56 +106,51 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "NDBBIAKOPKHFGPLCODIGOEKECHAA.doug@example.com"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"date": {
|
||||||
"c_type": "multipart",
|
"DateTime": {
|
||||||
"c_subtype": "mixed",
|
"year": 2000,
|
||||||
"attributes": {
|
"month": 5,
|
||||||
"boundary": "----=_NextPart_000_0004_01BFC037.28F2FA90"
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 36,
|
||||||
|
"second": 13,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "blueball.png"
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1486,19 +1485,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "redball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "redball.png"
|
"c_type": "attachment",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+32
-37
@@ -32,17 +32,9 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_transfer_encoding": {
|
||||||
"year": 2000,
|
"Text": "quoted-printable"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 15,
|
|
||||||
"second": 35,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,39 +42,42 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGIEKCCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"subject": {
|
||||||
"content_type": {
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"date": {
|
||||||
"X-Priority": [
|
"DateTime": {
|
||||||
"3 (Normal)"
|
"year": 2000,
|
||||||
],
|
"month": 5,
|
||||||
"Importance": [
|
"day": 17,
|
||||||
"Normal"
|
"hour": 19,
|
||||||
],
|
"minute": 15,
|
||||||
"X-Mailer": [
|
"second": 35,
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
"tz_before_gmt": true,
|
||||||
],
|
"tz_hour": 4,
|
||||||
"X-MSMail-Priority": [
|
"tz_minute": 0
|
||||||
"Normal"
|
}
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+90
-75
@@ -136,17 +136,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 32,
|
"hour": 19,
|
||||||
"second": 47,
|
"minute": 32,
|
||||||
"tz_before_gmt": true,
|
"second": 47,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -154,38 +165,20 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "NDBBIAKOPKHFGPLCODIGGEKECHAA.doug@example.com"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0002_01BFC036.AE309650"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"mime_version": {
|
||||||
"X-Priority": [
|
"Text": "1.0"
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -195,14 +188,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n"
|
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n"
|
||||||
@@ -211,19 +208,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "blueball.png"
|
"c_type": "attachment",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1558,19 +1561,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2878,19 +2887,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "redball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "redball.png"
|
"c_type": "attachment",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+33
-35
@@ -37,17 +37,25 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519010441.00a8d140@pop.example.com"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 1,
|
"day": 19,
|
||||||
"minute": 6,
|
"hour": 1,
|
||||||
"second": 18,
|
"minute": 6,
|
||||||
"tz_before_gmt": true,
|
"second": 18,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -55,37 +63,27 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519010441.00a8d140@pop.example.com",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1",
|
||||||
|
"format": "flowed"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "jschmuergen@example.com"
|
"address": "jschmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"subject": {
|
||||||
"content_type": {
|
"Text": "Die Hasen und die Frösche"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1",
|
|
||||||
"format": "flowed"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"1 (Highest)"
|
|
||||||
],
|
|
||||||
"Disposition-Notification-To": [
|
|
||||||
"<dwsauder@example.com>"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+36
-35
@@ -22,17 +22,21 @@ In einem nahen Teich wollten sie sich nun ers
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_transfer_encoding": {
|
||||||
"year": 2000,
|
"Text": "8bit"
|
||||||
"month": 5,
|
},
|
||||||
"day": 19,
|
"mime_version": {
|
||||||
"hour": 1,
|
"Text": "1.0"
|
||||||
"minute": 10,
|
},
|
||||||
"second": 27,
|
"message_id": {
|
||||||
"tz_before_gmt": true,
|
"Text": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com"
|
||||||
"tz_hour": 4,
|
},
|
||||||
"tz_minute": 0
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz M�ller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -40,33 +44,30 @@ In einem nahen Teich wollten sie sich nun ers
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519010842.00a8c7f0@pop.example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Fr�sche",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz M�ller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_transfer_encoding": "8bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Sender": [
|
"Text": "Die Hasen und die Fr�sche"
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
},
|
||||||
],
|
"date": {
|
||||||
"X-Mailer": [
|
"DateTime": {
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
"year": 2000,
|
||||||
],
|
"month": 5,
|
||||||
"X-Priority": [
|
"day": 19,
|
||||||
"1 (Highest)"
|
"hour": 1,
|
||||||
]
|
"minute": 10,
|
||||||
|
"second": 27,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+31
-27
@@ -30,17 +30,19 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 17,
|
"hour": 0,
|
||||||
"second": 39,
|
"minute": 17,
|
||||||
"tz_before_gmt": true,
|
"second": 39,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -48,30 +50,32 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519001217.00a85b60@pop.example.com",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519001217.00a85b60@pop.example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "jschmuergen@example.com"
|
"address": "jschmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"mime_version": {
|
||||||
"content_type": {
|
"Text": "1.0"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Die Hasen und die Frösche"
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+32
-37
@@ -31,17 +31,37 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "Windows-1252"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 30,
|
"hour": 19,
|
||||||
"second": 20,
|
"minute": 30,
|
||||||
"tz_before_gmt": true,
|
"second": 20,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -49,39 +69,14 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGCEKECHAA.doug@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "quoted-printable"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "Windows-1252"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+37
-42
@@ -32,17 +32,30 @@ welche also wohl noch ungl
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_transfer_encoding": {
|
||||||
"year": 2000,
|
"Text": "8bit"
|
||||||
"month": 5,
|
},
|
||||||
"day": 17,
|
"mime_version": {
|
||||||
"hour": 19,
|
"Text": "1.0"
|
||||||
"minute": 13,
|
},
|
||||||
"second": 51,
|
"to": {
|
||||||
"tz_before_gmt": true,
|
"Address": {
|
||||||
"tz_hour": 4,
|
"name": "Jürgen Schmürgen",
|
||||||
"tz_minute": 0
|
"address": "schmuergen@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,39 +63,21 @@ welche also wohl noch ungl
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGEEKCCHAA.doug@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Jürgen Schmürgen",
|
|
||||||
"address": "schmuergen@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "8bit",
|
"date": {
|
||||||
"content_type": {
|
"DateTime": {
|
||||||
"c_type": "text",
|
"year": 2000,
|
||||||
"c_subtype": "plain",
|
"month": 5,
|
||||||
"attributes": {
|
"day": 17,
|
||||||
"charset": "iso-8859-1"
|
"hour": 19,
|
||||||
|
"minute": 13,
|
||||||
|
"second": 51,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+48
-47
@@ -73,17 +73,18 @@ race. =20
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"message_id": {
|
||||||
"year": 2000,
|
"Text": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com"
|
||||||
"month": 5,
|
},
|
||||||
"day": 17,
|
"content_type": {
|
||||||
"hour": 19,
|
"ContentType": {
|
||||||
"minute": 38,
|
"c_type": "multipart",
|
||||||
"second": 28,
|
"c_subtype": "alternative",
|
||||||
"tz_before_gmt": true,
|
"attributes": {
|
||||||
"tz_hour": 4,
|
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
|
||||||
"tz_minute": 0
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -91,50 +92,46 @@ race. =20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGCEKFCHAA.doug@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"date": {
|
||||||
"c_type": "multipart",
|
"DateTime": {
|
||||||
"c_subtype": "alternative",
|
"year": 2000,
|
||||||
"attributes": {
|
"month": 5,
|
||||||
"boundary": "----=_NextPart_000_0005_01BFC037.799BEF60"
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 38,
|
||||||
|
"second": 28,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"mime_version": {
|
||||||
"X-MSMail-Priority": [
|
"Text": "1.0"
|
||||||
"Normal"
|
},
|
||||||
],
|
"subject": {
|
||||||
"X-Priority": [
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
||||||
@@ -142,13 +139,17 @@ race. =20
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+120
-85
@@ -199,17 +199,34 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_715392540==_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 36,
|
"hour": 0,
|
||||||
"second": 58,
|
"minute": 36,
|
||||||
"tz_before_gmt": true,
|
"second": 58,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -217,44 +234,30 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "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"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "=====================_715392540==_"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<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; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <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"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <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"
|
"contents": "<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; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <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"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <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"
|
||||||
@@ -262,14 +265,18 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa3ed95.png2aa3edd1.png"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa3ed95.png2aa3edd1.png"
|
||||||
@@ -278,20 +285,28 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "2aa3ed95.png"
|
"attributes": {
|
||||||
|
"filename": "2aa3ed95.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.2"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "2aa3ed95.png"
|
"attributes": {
|
||||||
|
"name": "2aa3ed95.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1626,21 +1641,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "2aa3edd1.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa3edd1.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "base64"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "image",
|
"content_disposition": {
|
||||||
"c_subtype": "png",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"name": "2aa3edd1.png"
|
"attributes": {
|
||||||
|
"filename": "2aa3edd1.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003556.00a918e0@pop.example.com.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -3102,20 +3125,26 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "attachment",
|
||||||
"c_subtype": "png",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "blueball.png"
|
||||||
"name": "blueball.png"
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -4449,20 +4478,26 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
|
|||||||
+69
-55
@@ -96,17 +96,34 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 53,
|
"hour": 0,
|
||||||
"second": 25,
|
"minute": 53,
|
||||||
"tz_before_gmt": true,
|
"second": 25,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Jürgen Schmürgen",
|
||||||
|
"address": "jschmuergen@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519005150.00a85230@pop.example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -114,29 +131,14 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519005150.00a85230@pop.example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Jürgen Schmürgen",
|
|
||||||
"address": "jschmuergen@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "=====================_716373961==_"
|
"attributes": {
|
||||||
|
"boundary": "=====================_716373961==_"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -146,13 +148,17 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -162,18 +168,22 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "application",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "mac-binhex40",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_disposition": {
|
||||||
"c_type": "application",
|
"ContentType": {
|
||||||
"c_subtype": "mac-binhex40",
|
"c_type": "attachment",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"name": "blueball.png"
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2113,18 +2123,22 @@ JB@ac)(GTFLiL)!d09'8!!!:
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "HasenundFr�sche.txt"
|
"attributes": {
|
||||||
|
"filename": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "application",
|
"ContentType": {
|
||||||
"c_subtype": "mac-binhex40",
|
"c_type": "application",
|
||||||
"attributes": {
|
"c_subtype": "mac-binhex40",
|
||||||
"name": "HasenundFr�sche.txt"
|
"attributes": {
|
||||||
|
"name": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+68
-52
@@ -103,17 +103,19 @@ end
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 50,
|
"hour": 0,
|
||||||
"second": 8,
|
"minute": 50,
|
||||||
"tz_before_gmt": true,
|
"second": 8,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -121,29 +123,29 @@ end
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519004755.00a86100@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "The Hare and the Tortoise",
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_716177458==_"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"message_id": {
|
||||||
"c_type": "multipart",
|
"Text": "4.2.0.58.20000519004755.00a86100@pop.example.com"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "=====================_716177458==_"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -153,12 +155,14 @@ end
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -168,19 +172,25 @@ end
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2045,19 +2055,25 @@ end
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "x-uuencode"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "blueball.png"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "attachment",
|
||||||
"c_subtype": "png",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "blueball.png"
|
||||||
"name": "blueball.png"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+89
-66
@@ -139,17 +139,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 33,
|
"hour": 0,
|
||||||
"second": 1,
|
"minute": 33,
|
||||||
"tz_before_gmt": true,
|
"second": 1,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -157,44 +168,36 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"type": "multipart/alternative",
|
||||||
|
"boundary": "=====================_715157131==_.REL"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "related",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "=====================_715157131==_.REL",
|
|
||||||
"type": "multipart/alternative"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -203,13 +206,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -219,20 +226,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_id": {
|
||||||
"c_type": "inline",
|
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "blueball.png"
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com.0",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "base64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "inline",
|
||||||
"c_type": "image",
|
"attributes": {
|
||||||
"c_subtype": "png",
|
"filename": "blueball.png"
|
||||||
"attributes": {
|
}
|
||||||
"name": "blueball.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1567,20 +1582,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "redball.png"
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003143.00a8d550@pop.example.com.1",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+84
-71
@@ -145,68 +145,65 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 42,
|
|
||||||
"second": 10,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 42,
|
||||||
|
"second": 10,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGGEKFCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "----=_NextPart_000_0008_01BFC037.FDD8EE90"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n<BR></FONT></DIV></BODY></HTML>\n"
|
||||||
@@ -214,14 +211,18 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
|
"contents": "\nThe Hare and the Tortoise \n \nA HARE one day ridiculed the short feet and slow pace of the Tortoise, who replied, laughing: \"Though you be swift as the wind, I will beat you in a race.\" The Hare, believing her assertion to be simply impossible, assented to the proposal; and they agreed that the Fox should choose the course and fix the goal. On the day appointed for the race the two started together. The Tortoise never for a moment stopped, but went on with a slow but steady pace straight to the end of the course. The Hare, lying down by the wayside, fell fast asleep. At last waking up, and moving as fast as he could, he saw the Tortoise had reached the goal, and was comfortably dozing after her fatigue. \n \nSlow but steady wins the race. \n\n"
|
||||||
@@ -230,19 +231,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1550,19 +1557,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "redball.png"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "attachment",
|
||||||
"c_subtype": "png",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "redball.png"
|
||||||
"name": "redball.png"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+33
-38
@@ -32,17 +32,40 @@ welche also wohl noch ungl
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 8,
|
"hour": 19,
|
||||||
"second": 29,
|
"minute": 8,
|
||||||
"tz_before_gmt": true,
|
"second": 29,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "8bit"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,39 +73,11 @@ welche also wohl noch ungl
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGIEKBCHAA.doug@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "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"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_transfer_encoding": "8bit",
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+100
-81
@@ -189,17 +189,30 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"message_id": {
|
||||||
"year": 2000,
|
"Text": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com"
|
||||||
"month": 5,
|
},
|
||||||
"day": 17,
|
"content_type": {
|
||||||
"hour": 19,
|
"ContentType": {
|
||||||
"minute": 47,
|
"c_type": "multipart",
|
||||||
"second": 24,
|
"c_subtype": "mixed",
|
||||||
"tz_before_gmt": true,
|
"attributes": {
|
||||||
"tz_hour": 4,
|
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
|
||||||
"tz_minute": 0
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Joe Blow",
|
||||||
|
"address": "jblow@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -207,50 +220,34 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGOEKFCHAA.doug@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
"year": 2000,
|
||||||
"to": {
|
"month": 5,
|
||||||
"Address": {
|
"day": 17,
|
||||||
"name": "Joe Blow",
|
"hour": 19,
|
||||||
"address": "jblow@example.com"
|
"minute": 47,
|
||||||
|
"second": 24,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "----=_NextPart_000_0010_01BFC038.B91BC650"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR> </DIV></FONT></BODY></HTML>\n"
|
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. <BR> <BR>Slow but steady wins the race. \n</FONT></DIV>\n<DIV><FONT face=Arial size=2><BR> </DIV></FONT></BODY></HTML>\n"
|
||||||
@@ -258,13 +255,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -274,15 +275,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_id": "938014623@17052000-0f9b",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "938014623@17052000-0f9b"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -1616,19 +1623,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "attachment",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "greenball.png"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "attachment",
|
||||||
"c_subtype": "png",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "greenball.png"
|
||||||
"name": "greenball.png"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2936,19 +2949,25 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "redball.png"
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+36
-41
@@ -31,17 +31,37 @@ IiANCg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "J�rgen Schm�rgen",
|
||||||
|
"address": "schmuergen@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 19,
|
"day": 17,
|
||||||
"minute": 11,
|
"hour": 19,
|
||||||
"second": 50,
|
"minute": 11,
|
||||||
"tz_before_gmt": true,
|
"second": 50,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -49,39 +69,14 @@ IiANCg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGAEKCCHAA.doug@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "J�rgen Schm�rgen",
|
|
||||||
"address": "schmuergen@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+82
-60
@@ -109,47 +109,49 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 0,
|
|
||||||
"minute": 56,
|
|
||||||
"second": 13,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519005505.00a853a0@pop.example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "jschmuergen@example.com"
|
"address": "jschmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "=====================_716541962==_"
|
"attributes": {
|
||||||
|
"boundary": "=====================_716541962==_"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Sender": [
|
"Text": "4.2.0.58.20000519005505.00a853a0@pop.example.com"
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
},
|
||||||
],
|
"date": {
|
||||||
"X-Mailer": [
|
"DateTime": {
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
"year": 2000,
|
||||||
]
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 56,
|
||||||
|
"second": 13,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -159,14 +161,18 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||||
@@ -175,19 +181,25 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "blueball.png"
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1522,18 +1534,22 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "farmerandstork.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_disposition": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "attachment",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"charset": "us-ascii"
|
"filename": "farmerandstork.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1542,20 +1558,26 @@ In einem nahen Teich wollten sie sich nun ers=E4ufen; sie eilten ihm zu;=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "HasenundFr�sche.txt"
|
"attributes": {
|
||||||
|
"filename": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||||
|
|||||||
+86
-67
@@ -110,17 +110,41 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"type": "text/html",
|
||||||
|
"boundary": "=====================_715429112==_.REL"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 37,
|
"hour": 0,
|
||||||
"second": 39,
|
"minute": 37,
|
||||||
"tz_before_gmt": true,
|
"second": 39,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -128,45 +152,24 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Die Hasen und die Frösche"
|
||||||
"subject": "Die Hasen und die Frösche",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "related",
|
|
||||||
"attributes": {
|
|
||||||
"type": "text/html",
|
|
||||||
"boundary": "=====================_715429112==_.REL"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<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; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <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"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <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"
|
"contents": "<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; "wir leben", sprach ein Redner, "in\nsteter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler,\nja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst.\nAuf, laßt uns ein für allemal sterben." <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"Halt", rief nun eben dieser Sprecher, "wir wollen das\nErsäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr\nseht, einige Tiere, welche also wohl noch unglücklicher sein müssen als\nwir." <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"
|
||||||
@@ -180,20 +183,28 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_id": {
|
||||||
"c_type": "inline",
|
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "2aa48eb6.png"
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa48eb6.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.2",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "base64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "inline",
|
||||||
"c_type": "image",
|
"attributes": {
|
||||||
"c_subtype": "png",
|
"filename": "2aa48eb6.png"
|
||||||
"attributes": {
|
}
|
||||||
"name": "2aa48eb6.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1528,21 +1539,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "2aa48ec0.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa48ec0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "4.2.0.58.20000519003735.00a8d7e0@pop.example.com.3"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "image",
|
"content_disposition": {
|
||||||
"c_subtype": "png",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"name": "2aa48ec0.png"
|
"attributes": {
|
||||||
|
"filename": "2aa48ec0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
|
|||||||
+112
-81
@@ -172,17 +172,31 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 38,
|
"hour": 0,
|
||||||
"second": 13,
|
"minute": 38,
|
||||||
"tz_before_gmt": true,
|
"second": 13,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -190,43 +204,32 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003809.00a85140@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "=====================_715462801==_"
|
"attributes": {
|
||||||
|
"boundary": "=====================_715462801==_"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -241,21 +244,29 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "2aa51367.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa51367.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003809.00a85140@pop.example.com.2",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.2"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "image",
|
"content_disposition": {
|
||||||
"c_subtype": "png",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"name": "2aa51367.png"
|
"attributes": {
|
||||||
|
"filename": "2aa51367.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -1589,20 +1600,28 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003809.00a85140@pop.example.com.3"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "2aa51371.png"
|
"attributes": {
|
||||||
|
"filename": "2aa51371.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003809.00a85140@pop.example.com.3",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "2aa51371.png"
|
"attributes": {
|
||||||
|
"name": "2aa51371.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3065,19 +3084,25 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "blueball.png"
|
"c_type": "attachment",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4412,19 +4437,25 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+67
-51
@@ -85,17 +85,22 @@ Birds of a feather flock together.
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 59,
|
"hour": 0,
|
||||||
"second": 31,
|
"minute": 59,
|
||||||
"tz_before_gmt": true,
|
"second": 31,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -103,9 +108,9 @@ Birds of a feather flock together.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519005818.00a86aa0@pop.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "4.2.0.58.20000519005818.00a86aa0@pop.example.com"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
@@ -113,19 +118,16 @@ Birds of a feather flock together.
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "=====================_716740438==_"
|
"attributes": {
|
||||||
|
"boundary": "=====================_716740438==_"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Sender": [
|
"Text": "Die Hasen und die Frösche"
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -135,14 +137,18 @@ Birds of a feather flock together.
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||||
@@ -151,21 +157,27 @@ Birds of a feather flock together.
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "HasenundFr�sche.txt"
|
"attributes": {
|
||||||
|
"filename": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"x-mac-creator": "74747874",
|
"attributes": {
|
||||||
"name": "HasenundFr�sche.txt",
|
"x-mac-type": "54455854",
|
||||||
"x-mac-type": "54455854"
|
"x-mac-creator": "74747874",
|
||||||
|
"name": "HasenundFr�sche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -174,18 +186,22 @@ Birds of a feather flock together.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "farmerandstork.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_disposition": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "attachment",
|
||||||
"attributes": {
|
"attributes": {
|
||||||
"charset": "us-ascii"
|
"filename": "farmerandstork.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+32
-37
@@ -32,17 +32,9 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"mime_version": {
|
||||||
"year": 2000,
|
"Text": "1.0"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 10,
|
|
||||||
"second": 31,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -50,39 +42,42 @@ Tiere, welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 10,
|
||||||
|
"second": 31,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "J�rgen Schm�rgen",
|
"name": "J�rgen Schm�rgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"subject": {
|
||||||
"content_type": {
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"content_transfer_encoding": {
|
||||||
"X-MimeOLE": [
|
"Text": "quoted-printable"
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
},
|
||||||
],
|
"message_id": {
|
||||||
"X-Mailer": [
|
"Text": "NDBBIAKOPKHFGPLCODIGMEKBCHAA.doug@example.com"
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+76
-63
@@ -157,17 +157,12 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"subject": {
|
||||||
"year": 2000,
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
"month": 5,
|
},
|
||||||
"day": 17,
|
"mime_version": {
|
||||||
"hour": 19,
|
"Text": "1.0"
|
||||||
"minute": 44,
|
|
||||||
"second": 45,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -175,50 +170,52 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 44,
|
||||||
|
"second": 45,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "jblow@example.com"
|
"address": "jblow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"message_id": {
|
||||||
"c_type": "multipart",
|
"Text": "NDBBIAKOPKHFGPLCODIGKEKFCHAA.doug@example.com"
|
||||||
"c_subtype": "related",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "----=_NextPart_000_000C_01BFC038.5A5C8E60"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. </FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT> </DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR> <BR>Slow but steady wins \nthe race. </FONT></DIV>\n<DIV> </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"
|
"contents": "<!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> <BR>A HARE \none day ridiculed the short feet and slow pace of the Tortoise, who replied, \nlaughing: \"Though you be swift as the wind, I will beat you in a \nrace.\" The Hare, believing her assertion to be simply impossible, assented \nto the proposal; and they agreed that the Fox should choose the course and fix \nthe goal. On the day appointed for the race the two started \ntogether. The Tortoise never for a moment stopped, but went on with a slow \nbut steady pace straight to the end of the course. The Hare, lying down by \nthe wayside, fell fast asleep. At last waking up, and moving as fast as he \ncould, he saw the Tortoise had reached the goal, and was comfortably dozing \nafter her fatigue. </FONT></DIV>\n<DIV><FONT face=Arial size=2></FONT> </DIV>\n<DIV><FONT face=Arial size=2><IMG align=baseline alt=\"blue ball\" border=0 \nhspace=0 src=\"cid:823504223@17052000-0f8d\"><BR> <BR>Slow but steady wins \nthe race. </FONT></DIV>\n<DIV> </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"
|
||||||
@@ -226,13 +223,17 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -242,15 +243,21 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_id": "823504223@17052000-0f8d",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "823504223@17052000-0f8d"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -1584,14 +1591,20 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_id": "823504223@17052000-0f94",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "823504223@17052000-0f94"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+34
-33
@@ -28,17 +28,31 @@ Slow but steady wins the race.
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 26,
|
"hour": 23,
|
||||||
"second": 16,
|
"minute": 26,
|
||||||
"tz_before_gmt": true,
|
"second": 16,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Joe Blow",
|
||||||
|
"address": "blow@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "392362D8.B650789F@example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -46,33 +60,20 @@ Slow but steady wins the race.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392362D8.B650789F@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Joe Blow",
|
|
||||||
"address": "blow@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"1 (Highest)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+89
-65
@@ -112,17 +112,15 @@ Slow but steady wins the race.
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_type": {
|
||||||
"year": 2000,
|
"ContentType": {
|
||||||
"month": 5,
|
"c_type": "multipart",
|
||||||
"day": 17,
|
"c_subtype": "mixed",
|
||||||
"hour": 23,
|
"attributes": {
|
||||||
"minute": 28,
|
"boundary": "------------0BBC657DDC74A0B8454627FD"
|
||||||
"second": 27,
|
}
|
||||||
"tz_before_gmt": true,
|
}
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -130,29 +128,33 @@ Slow but steady wins the race.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923635B.85C58444@example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "3923635B.85C58444@example.com"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 28,
|
||||||
|
"second": 27,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------0BBC657DDC74A0B8454627FD"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
],
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -164,13 +166,17 @@ Slow but steady wins the race.
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -182,19 +188,25 @@ Slow but steady wins the race.
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "blueball.png"
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1529,19 +1541,25 @@ Slow but steady wins the race.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2849,20 +2867,26 @@ Slow but steady wins the race.
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "hareandtoroise.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"name": "hareandtoroise.txt",
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "7bit"
|
||||||
"c_type": "text",
|
},
|
||||||
"c_subtype": "plain",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "hareandtoroise.txt",
|
"c_type": "inline",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"filename": "hareandtoroise.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+84
-52
@@ -97,17 +97,24 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"subject": {
|
||||||
"year": 2000,
|
"Text": "Test message from PINE"
|
||||||
"month": 5,
|
},
|
||||||
"day": 19,
|
"message_id": {
|
||||||
"hour": 9,
|
"Text": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com"
|
||||||
"minute": 55,
|
},
|
||||||
"second": 48,
|
"mime_version": {
|
||||||
"tz_before_gmt": true,
|
"Text": "1.0"
|
||||||
"tz_hour": 4,
|
},
|
||||||
"tz_minute": 0
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "-1463757054-952513540-958744548=:8452"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -115,21 +122,24 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "doug@penguin.example.com"
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "Pine.LNX.4.21.0005190951410.8452-102000@penguin.example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Test message from PINE",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 9,
|
||||||
|
"minute": 55,
|
||||||
|
"second": 48,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "-1463757054-952513540-958744548=:8452"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -139,12 +149,14 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "US-ASCII"
|
"attributes": {
|
||||||
|
"charset": "US-ASCII"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -154,22 +166,32 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_description": "A PNG graphic file",
|
"content_transfer_encoding": {
|
||||||
"content_disposition": {
|
"Text": "BASE64"
|
||||||
"c_type": "attachment",
|
},
|
||||||
"attributes": {
|
"content_description": {
|
||||||
"filename": "redball.png"
|
"Text": "A PNG graphic file"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "application",
|
||||||
|
"c_subtype": "octet-stream",
|
||||||
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "BASE64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "attachment",
|
||||||
"c_type": "application",
|
"attributes": {
|
||||||
"c_subtype": "octet-stream",
|
"filename": "redball.png"
|
||||||
"attributes": {
|
}
|
||||||
"name": "redball.png"
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005190955480.8452@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -1631,21 +1653,31 @@ Z3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_description": "A PNG graphic file",
|
"content_type": {
|
||||||
"content_disposition": {
|
"ContentType": {
|
||||||
"c_type": "attachment",
|
"c_type": "application",
|
||||||
"attributes": {
|
"c_subtype": "octet-stream",
|
||||||
"filename": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com",
|
"content_description": {
|
||||||
"content_transfer_encoding": "BASE64",
|
"Text": "A PNG graphic file"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "application",
|
"content_id": {
|
||||||
"c_subtype": "octet-stream",
|
"Text": "Pine.LNX.4.21.0005190955481.8452@penguin.example.com"
|
||||||
"attributes": {
|
},
|
||||||
"name": "blueball.png"
|
"content_transfer_encoding": {
|
||||||
|
"Text": "BASE64"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "attachment",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+81
-59
@@ -134,17 +134,9 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"message_id": {
|
||||||
"year": 2000,
|
"Text": "39235EAD.E48E2160@example.com"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 8,
|
|
||||||
"second": 29,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -152,40 +144,54 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39235EAD.E48E2160@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "------------C78F594988075E36AE03C243"
|
"attributes": {
|
||||||
|
"boundary": "------------C78F594988075E36AE03C243"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"date": {
|
||||||
"X-Accept-Language": [
|
"DateTime": {
|
||||||
"en"
|
"year": 2000,
|
||||||
],
|
"month": 5,
|
||||||
"X-Mailer": [
|
"day": 17,
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
"hour": 23,
|
||||||
]
|
"minute": 8,
|
||||||
|
"second": 29,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -196,13 +202,17 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -214,19 +224,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "greenball.png"
|
"c_type": "inline",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1534,19 +1550,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "blueball.png"
|
"c_type": "inline",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+31
-30
@@ -34,51 +34,52 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 30,
|
|
||||||
"second": 41,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392363E1.2AC47AB3@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "UTF-8"
|
"attributes": {
|
||||||
|
"charset": "UTF-8"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
],
|
"content_transfer_encoding": {
|
||||||
"X-Accept-Language": [
|
"Text": "quoted-printable"
|
||||||
"en"
|
},
|
||||||
],
|
"message_id": {
|
||||||
"X-Priority": [
|
"Text": "392363E1.2AC47AB3@example.com"
|
||||||
"5 (Lowest)"
|
},
|
||||||
]
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 30,
|
||||||
|
"second": 41,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+36
-32
@@ -27,17 +27,37 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "UTF-7"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 33,
|
"hour": 23,
|
||||||
"second": 43,
|
"minute": 33,
|
||||||
"tz_before_gmt": true,
|
"second": 43,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz M+APw-ller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -45,30 +65,14 @@ welche also wohl noch ungl+uKs-licher sein m+vLM-en als wir."
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39236497.12FA2A89@example.com",
|
"content_transfer_encoding": {
|
||||||
"mime_version": "1.0",
|
"Text": "7bit"
|
||||||
"subject": "Die Hasen und die Fr+APY-sche",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz M+APw-ller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"subject": {
|
||||||
"content_type": {
|
"Text": "Die Hasen und die Fr+APY-sche"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "UTF-7"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Accept-Language": [
|
"Text": "39236497.12FA2A89@example.com"
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+118
-80
@@ -213,58 +213,64 @@ YII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"mime_version": {
|
||||||
"year": 2000,
|
"Text": "1.0"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 13,
|
|
||||||
"second": 9,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Doug Sauder",
|
|
||||||
"address": "dwsauder@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message_id": "39235FC5.276CCE00@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche (Netscape Messenger 4.7)",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "Die Hasen und die Frösche (Netscape Messenger 4.7)"
|
||||||
"c_subtype": "mixed",
|
},
|
||||||
"attributes": {
|
"date": {
|
||||||
"boundary": "------------A1E83A41894D3755390B838A"
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 13,
|
||||||
|
"second": 9,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"content_type": {
|
||||||
"X-Accept-Language": [
|
"ContentType": {
|
||||||
"en"
|
"c_type": "multipart",
|
||||||
],
|
"c_subtype": "mixed",
|
||||||
"X-Mailer": [
|
"attributes": {
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
"boundary": "------------A1E83A41894D3755390B838A"
|
||||||
]
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "39235FC5.276CCE00@example.com"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -275,14 +281,18 @@ YII=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "[blue ball]\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n[Image]\n\n\n"
|
"contents": "[blue ball]\n\nDie Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n[Image]\n\n\n"
|
||||||
@@ -293,18 +303,26 @@ YII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "C:TEMPnsmailEG.png"
|
"attributes": {
|
||||||
|
"filename": "C:TEMPnsmailEG.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part1.39235FC5.E71D8178@example.com",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png"
|
"c_type": "image",
|
||||||
|
"c_subtype": "png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "part1.39235FC5.E71D8178@example.com"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -1638,18 +1656,26 @@ YII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "C:TEMPnsmail39.png"
|
"attributes": {
|
||||||
|
"filename": "C:TEMPnsmail39.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part2.39235FC5.E71D8178@example.com",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png"
|
"c_type": "image",
|
||||||
|
"c_subtype": "png"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "part2.39235FC5.E71D8178@example.com"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -3111,19 +3137,25 @@ YII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "redball.png"
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4586,20 +4618,26 @@ YII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "inline",
|
||||||
"c_subtype": "png",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "greenball.png"
|
||||||
"name": "greenball.png"
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
|
|||||||
+34
-22
@@ -27,40 +27,52 @@ lche also wohl noch ungl=FCcklicher sein m=FCssen als wir."=20
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 19,
|
|
||||||
"hour": 10,
|
|
||||||
"minute": 18,
|
|
||||||
"second": 3,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "doug@penguin.example.com"
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 10,
|
||||||
|
"minute": 18,
|
||||||
|
"second": 3,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "QUOTED-PRINTABLE",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "QUOTED-PRINTABLE"
|
||||||
"c_type": "text",
|
},
|
||||||
"c_subtype": "plain",
|
"message_id": {
|
||||||
"attributes": {
|
"Text": "Pine.LNX.4.21.0005191014500.8452-100000@penguin.example.com"
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+59
-47
@@ -52,27 +52,13 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"message_id": {
|
||||||
"year": 2000,
|
"Text": "392366A7.21929EA7@example.com"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 42,
|
|
||||||
"second": 31,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"subject": {
|
||||||
"Address": {
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"name": "Doug Sauder",
|
|
||||||
"address": "dwsauder@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"message_id": "392366A7.21929EA7@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
@@ -80,19 +66,35 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "------------E7889DDF0F75D34163841C59"
|
"attributes": {
|
||||||
|
"boundary": "------------E7889DDF0F75D34163841C59"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"date": {
|
||||||
"X-Mailer": [
|
"DateTime": {
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
"year": 2000,
|
||||||
],
|
"month": 5,
|
||||||
"X-Accept-Language": [
|
"day": 17,
|
||||||
"en"
|
"hour": 23,
|
||||||
]
|
"minute": 42,
|
||||||
|
"second": 31,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -103,14 +105,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": " \r"
|
"contents": " \r"
|
||||||
@@ -120,19 +126,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "blueball.png"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "inline",
|
||||||
"c_subtype": "png",
|
"attributes": {
|
||||||
"attributes": {
|
"filename": "blueball.png"
|
||||||
"name": "blueball.png"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+33
-29
@@ -18,48 +18,52 @@ Slow but steady wins the race.
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
|
||||||
"year": 2000,
|
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 24,
|
|
||||||
"second": 11,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Doug Sauder",
|
"name": "Doug Sauder",
|
||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923625B.59F0C3AC@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 24,
|
||||||
|
"second": 11,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"message_id": {
|
||||||
"content_type": {
|
"Text": "3923625B.59F0C3AC@example.com"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "us-ascii"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"subject": {
|
||||||
"X-Mailer": [
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
],
|
"content_type": {
|
||||||
"X-Accept-Language": [
|
"ContentType": {
|
||||||
"en"
|
"c_type": "text",
|
||||||
]
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+111
-77
@@ -172,17 +172,34 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 18,
|
"hour": 23,
|
||||||
"second": 27,
|
"minute": 18,
|
||||||
"tz_before_gmt": true,
|
"second": 27,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "39236103.FFE674FC@example.com"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Jürgen Schmürgen",
|
||||||
|
"address": "schmuergen@example.com"
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -190,41 +207,30 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39236103.FFE674FC@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Jürgen Schmürgen",
|
|
||||||
"address": "schmuergen@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "------------B7133A01A6B323BF00DBC9A7"
|
"attributes": {
|
||||||
|
"boundary": "------------B7133A01A6B323BF00DBC9A7"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<!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ösche</font></b>\r\n<p>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n\r"
|
"contents": "<!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ösche</font></b>\r\n<p>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<p><img SRC=\"cid:part2.39236103.1B697A54@example.com\" ALT=\"red ball\" height=27 width=27></html>\r\n\r"
|
||||||
@@ -242,18 +248,26 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "C:TEMPnsmailV0.png"
|
"c_subtype": "png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part1.39236103.1B697A54@example.com",
|
"content_id": {
|
||||||
"content_transfer_encoding": "base64",
|
"Text": "part1.39236103.1B697A54@example.com"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "image",
|
"content_transfer_encoding": {
|
||||||
"c_subtype": "png"
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_disposition": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "inline",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "C:TEMPnsmailV0.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -1587,18 +1601,26 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "C:TEMPnsmailNM.png"
|
"c_subtype": "png"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "part2.39236103.1B697A54@example.com",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "base64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "inline",
|
||||||
"c_type": "image",
|
"attributes": {
|
||||||
"c_subtype": "png"
|
"filename": "C:TEMPnsmailNM.png"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "part2.39236103.1B697A54@example.com"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -3060,19 +3082,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "greenball.png"
|
"c_type": "inline",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4380,19 +4408,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "blueball.png"
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+37
-33
@@ -29,48 +29,52 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_type": {
|
||||||
"year": 2000,
|
"ContentType": {
|
||||||
"month": 5,
|
"c_type": "text",
|
||||||
"day": 17,
|
"c_subtype": "plain",
|
||||||
"hour": 23,
|
"attributes": {
|
||||||
"minute": 41,
|
"charset": "iso-8859-1"
|
||||||
"second": 7,
|
}
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Doug Sauder",
|
|
||||||
"address": "dwsauder@example.com"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39236653.CAA8A090@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 41,
|
||||||
|
"second": 7,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "39236653.CAA8A090@example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"subject": {
|
||||||
"content_type": {
|
"Text": "Die Hasen und die Frösche"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "iso-8859-1"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"mime_version": {
|
||||||
"X-Accept-Language": [
|
"Text": "1.0"
|
||||||
"en"
|
},
|
||||||
],
|
"content_transfer_encoding": {
|
||||||
"X-Mailer": [
|
"Text": "quoted-printable"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
]
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+57
-35
@@ -58,17 +58,19 @@ vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 10,
|
"day": 19,
|
||||||
"minute": 23,
|
"hour": 10,
|
||||||
"second": 16,
|
"minute": 23,
|
||||||
"tz_before_gmt": true,
|
"second": 16,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -76,20 +78,28 @@ vAAAAABJRU5ErkJggg==
|
|||||||
"address": "doug@penguin.example.com"
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "PNG graphic"
|
||||||
"subject": "PNG graphic",
|
},
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005191019440.8452-101000@penguin.example.com"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "-1463757054-170444605-958746196=:8452"
|
"attributes": {
|
||||||
|
"boundary": "-1463757054-170444605-958746196=:8452"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -100,12 +110,14 @@ vAAAAABJRU5ErkJggg==
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "US-ASCII"
|
"attributes": {
|
||||||
|
"charset": "US-ASCII"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -115,22 +127,32 @@ vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_description": "red ball",
|
"content_type": {
|
||||||
"content_disposition": {
|
"ContentType": {
|
||||||
"c_type": "attachment",
|
"c_type": "application",
|
||||||
"attributes": {
|
"c_subtype": "octet-stream",
|
||||||
"filename": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com",
|
"content_description": {
|
||||||
"content_transfer_encoding": "BASE64",
|
"Text": "red ball"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "application",
|
"content_disposition": {
|
||||||
"c_subtype": "octet-stream",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005191023160.8452@penguin.example.com"
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "BASE64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
|
|||||||
+63
-51
@@ -59,17 +59,40 @@ Birds of a feather flock together.
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"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": "------------77060D866A66DC8D0921E051"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "3923686C.99FB5E36@example.com"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 23,
|
"day": 17,
|
||||||
"minute": 50,
|
"hour": 23,
|
||||||
"second": 4,
|
"minute": 50,
|
||||||
"tz_before_gmt": true,
|
"second": 4,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -77,29 +100,8 @@ Birds of a feather flock together.
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923686C.99FB5E36@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Joe Blow",
|
|
||||||
"address": "blow@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------77060D866A66DC8D0921E051"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Accept-Language": [
|
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -109,14 +111,18 @@ Birds of a feather flock together.
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
|
"contents": "\r\nThe Hare and the Tortoise \r\n \r\nA HARE one day ridiculed the short feet and slow pace of the Tortoise,\r\nwho replied, laughing: \"Though you be swift as the wind, I will beat\r\nyou in a race.\" The Hare, believing her assertion to be simply\r\nimpossible, assented to the proposal; and they agreed that the Fox\r\nshould choose the course and fix the goal. On the day appointed for the\r\nrace the two started together. The Tortoise never for a moment stopped,\r\nbut went on with a slow but steady pace straight to the end of the\r\ncourse. The Hare, lying down by the wayside, fell fast asleep. At last\r\nwaking up, and moving as fast as he could, he saw the Tortoise had\r\nreached the goal, and was comfortably dozing after her fatigue. \r\n \r\nSlow but steady wins the race.\r"
|
||||||
@@ -125,20 +131,26 @@ Birds of a feather flock together.
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "text",
|
||||||
"filename": "farmerandstork.txt"
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "us-ascii",
|
||||||
|
"name": "farmerandstork.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "7bit"
|
||||||
"c_type": "text",
|
},
|
||||||
"c_subtype": "plain",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"charset": "us-ascii",
|
"c_type": "inline",
|
||||||
"name": "farmerandstork.txt"
|
"attributes": {
|
||||||
|
"filename": "farmerandstork.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+52
-42
@@ -62,17 +62,31 @@ als wir."
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "392359CF.DFF4527@example.com"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 22,
|
"day": 17,
|
||||||
"minute": 47,
|
"hour": 22,
|
||||||
"second": 43,
|
"minute": 47,
|
||||||
"tz_before_gmt": true,
|
"second": 43,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -80,41 +94,33 @@ als wir."
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392359CF.DFF4527@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Die Hasen und die Frösche (Netscape Communicator 4.7)",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "alternative",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "alternative",
|
||||||
"boundary": "------------9D454F23DA86BCD63FA3805F"
|
"attributes": {
|
||||||
|
"boundary": "------------9D454F23DA86BCD63FA3805F"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"mime_version": {
|
||||||
"X-Accept-Language": [
|
"Text": "1.0"
|
||||||
"en"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Frösche</b>\r\n<p>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<br> \r\n<br> </html>\r\n\r"
|
"contents": "<!doctype html public \"-//w3c//dtd html 4.0 transitional//en\">\r\n<html>\r\n<b>Die Hasen und die Frösche</b>\r\n<p>Die Hasen klagten einst über ihre mißliche Lage; \"wir leben\",\r\nsprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute\r\nder Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger\r\nals der Tod selbst. Auf, laßt uns ein für allemal sterben.\"\r\n<p>In einem nahen Teich wollten sie sich nun ersäufen; sie eilten\r\nihm zu; allein das außerordentliche Getöse und ihre wunderbare\r\nGestalt erschreckte eine Menge Frösche, die am Ufer saßen, so\r\nsehr, daß sie aufs schnellste untertauchten.\r\n<p>\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen\r\nnoch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht,\r\neinige Tiere, welche also wohl noch unglücklicher sein müssen\r\nals wir.\"\r\n<br> \r\n<br> </html>\r\n\r"
|
||||||
@@ -122,14 +128,18 @@ als wir."
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
|
||||||
|
|||||||
+89
-65
@@ -138,17 +138,15 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"mime_version": {
|
||||||
"year": 2000,
|
"Text": "1.0"
|
||||||
"month": 5,
|
},
|
||||||
"day": 17,
|
"to": {
|
||||||
"hour": 23,
|
"Address": {
|
||||||
"minute": 6,
|
"name": "Joe Blow",
|
||||||
"second": 4,
|
"address": "blow@example.com"
|
||||||
"tz_before_gmt": true,
|
}
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -156,29 +154,33 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "39235E1C.1DC7EA90@example.com",
|
"subject": {
|
||||||
"mime_version": "1.0",
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Joe Blow",
|
|
||||||
"address": "blow@example.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "------------A1FCDEE154E03D875E5D6779"
|
"attributes": {
|
||||||
|
"boundary": "------------A1FCDEE154E03D875E5D6779"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Mailer": [
|
"Text": "39235E1C.1DC7EA90@example.com"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
],
|
"date": {
|
||||||
"X-Accept-Language": [
|
"DateTime": {
|
||||||
"en"
|
"year": 2000,
|
||||||
]
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 6,
|
||||||
|
"second": 4,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -191,14 +193,18 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein\nRedner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde,\nder Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der\nTod selbst. Auf, laßt uns ein für allemal sterben.\"\n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu;\nallein das außerordentliche Getöse und ihre wunderbare Gestalt\nerschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs\nschnellste untertauchten.\n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein\nwenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere,\nwelche also wohl noch unglücklicher sein müssen als wir.\"\n\n\n"
|
||||||
@@ -210,19 +216,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "redball.png"
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1685,19 +1697,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "greenball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "greenball.png"
|
"c_type": "inline",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3005,19 +3023,25 @@ eSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "blueball.png"
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+60
-38
@@ -43,17 +43,15 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_type": {
|
||||||
"year": 2000,
|
"ContentType": {
|
||||||
"month": 5,
|
"c_type": "multipart",
|
||||||
"day": 19,
|
"c_subtype": "mixed",
|
||||||
"hour": 10,
|
"attributes": {
|
||||||
"minute": 26,
|
"boundary": "-1463757054-891160829-958746372=:8452"
|
||||||
"second": 12,
|
}
|
||||||
"tz_before_gmt": true,
|
}
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -61,9 +59,12 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
|||||||
"address": "doug@penguin.example.com"
|
"address": "doug@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com",
|
"message_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "Pine.LNX.4.21.0005191024380.8452-200000@penguin.example.com"
|
||||||
"subject": "Die Hasen und die Frösche",
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"AddressList": [
|
"AddressList": [
|
||||||
{
|
{
|
||||||
@@ -76,12 +77,21 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
|||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
"content_type": {
|
"date": {
|
||||||
"c_type": "multipart",
|
"DateTime": {
|
||||||
"c_subtype": "mixed",
|
"year": 2000,
|
||||||
"attributes": {
|
"month": 5,
|
||||||
"boundary": "-1463757054-891160829-958746372=:8452"
|
"day": 19,
|
||||||
|
"hour": 10,
|
||||||
|
"minute": 26,
|
||||||
|
"second": 12,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -91,12 +101,14 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "US-ASCII"
|
"attributes": {
|
||||||
|
"charset": "US-ASCII"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -106,23 +118,33 @@ bGljaGVyIHNlaW4gbfxzc2VuIGFscyB3aXIuIiANDQoNDQo=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_description": "Short story in German",
|
"content_description": {
|
||||||
"content_disposition": {
|
"Text": "Short story in German"
|
||||||
"c_type": "attachment",
|
},
|
||||||
"attributes": {
|
"content_type": {
|
||||||
"filename": "HasenundFrösche.txt"
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1",
|
||||||
|
"name": "HasenundFrösche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com",
|
"content_transfer_encoding": {
|
||||||
"content_transfer_encoding": "BASE64",
|
"Text": "BASE64"
|
||||||
"content_type": {
|
},
|
||||||
"c_type": "text",
|
"content_disposition": {
|
||||||
"c_subtype": "plain",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"charset": "iso-8859-1",
|
"attributes": {
|
||||||
"name": "HasenundFrösche.txt"
|
"filename": "HasenundFrösche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "Pine.LNX.4.21.0005191026120.8452@penguin.example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\r\r\n\r\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\r\n\r\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\r\n\r\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\r\n\r\r\n"
|
"contents": "Die Hasen und die Frösche\r\r\n\r\r\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \r\r\n\r\r\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \r\r\n\r\r\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \r\r\n\r\r\n"
|
||||||
|
|||||||
+34
-30
@@ -33,48 +33,52 @@ welche also wohl noch ungl=FCcklicher sein m=FCssen als wir."
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 17,
|
"month": 5,
|
||||||
"hour": 22,
|
"day": 17,
|
||||||
"minute": 31,
|
"hour": 22,
|
||||||
"second": 57,
|
"minute": 31,
|
||||||
"tz_before_gmt": true,
|
"second": 57,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
},
|
"tz_minute": 0
|
||||||
"from": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Doug Sauder",
|
|
||||||
"address": "dwsauder@example.com"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923561C.B7078DEF@example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche (Netscape Communicator 4.7)",
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche (Netscape Communicator 4.7)"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Jürgen Schmürgen",
|
"name": "Jürgen Schmürgen",
|
||||||
"address": "schmuergen@example.com"
|
"address": "schmuergen@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"content_transfer_encoding": {
|
||||||
"X-Accept-Language": [
|
"Text": "quoted-printable"
|
||||||
"en"
|
},
|
||||||
],
|
"message_id": {
|
||||||
"X-Mailer": [
|
"Text": "3923561C.B7078DEF@example.com"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
]
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+55
-43
@@ -61,17 +61,15 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_type": {
|
||||||
"year": 2000,
|
"ContentType": {
|
||||||
"month": 5,
|
"c_type": "multipart",
|
||||||
"day": 17,
|
"c_subtype": "mixed",
|
||||||
"hour": 23,
|
"attributes": {
|
||||||
"minute": 47,
|
"boundary": "------------CA611088711119FBDB3473B4"
|
||||||
"second": 8,
|
}
|
||||||
"tz_before_gmt": true,
|
}
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -79,29 +77,33 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "392367BC.3D075C95@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"subject": {
|
||||||
"c_type": "multipart",
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "------------CA611088711119FBDB3473B4"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Accept-Language": [
|
"Text": "392367BC.3D075C95@example.com"
|
||||||
"en"
|
},
|
||||||
],
|
"mime_version": {
|
||||||
"X-Mailer": [
|
"Text": "1.0"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
]
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 47,
|
||||||
|
"second": 8,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -111,13 +113,17 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -127,21 +133,27 @@ n wenig aufschieben, denn auch uns f=FCrchten, wie ihr seht, einige Tiere=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "HasenundFrösche.txt"
|
"attributes": {
|
||||||
|
"filename": "HasenundFrösche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"name": "HasenundFrösche.txt",
|
"attributes": {
|
||||||
"charset": "iso-8859-1"
|
"charset": "iso-8859-1",
|
||||||
|
"name": "HasenundFrösche.txt"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n"
|
||||||
|
|||||||
+87
-63
@@ -156,47 +156,49 @@ end
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"subject": {
|
||||||
"year": 2000,
|
"Text": "Test message from Netscape Communicator 4.7"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 23,
|
|
||||||
"minute": 44,
|
|
||||||
"second": 12,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"content_type": {
|
||||||
"Address": {
|
"ContentType": {
|
||||||
"name": "Doug Sauder",
|
"c_type": "multipart",
|
||||||
"address": "dwsauder@example.com"
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "------------177483472E7788F4AD46AB1A"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "3923670C.67D83A99@example.com",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"subject": "Test message from Netscape Communicator 4.7",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Joe Blow",
|
"name": "Joe Blow",
|
||||||
"address": "blow@example.com"
|
"address": "blow@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"date": {
|
||||||
"c_type": "multipart",
|
"DateTime": {
|
||||||
"c_subtype": "mixed",
|
"year": 2000,
|
||||||
"attributes": {
|
"month": 5,
|
||||||
"boundary": "------------177483472E7788F4AD46AB1A"
|
"day": 17,
|
||||||
|
"hour": 23,
|
||||||
|
"minute": 44,
|
||||||
|
"second": 12,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"message_id": {
|
||||||
"X-Mailer": [
|
"Text": "3923670C.67D83A99@example.com"
|
||||||
"Mozilla 4.7 [en] (WinNT; I)"
|
},
|
||||||
],
|
"mime_version": {
|
||||||
"X-Accept-Language": [
|
"Text": "1.0"
|
||||||
"en"
|
},
|
||||||
]
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Doug Sauder",
|
||||||
|
"address": "dwsauder@example.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -209,13 +211,17 @@ end
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -228,19 +234,25 @@ end
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "redball.png"
|
"attributes": {
|
||||||
|
"filename": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "redball.png"
|
"attributes": {
|
||||||
|
"name": "redball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -2318,19 +2330,25 @@ end
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4190,19 +4208,25 @@ end
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "x-uuencode"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "blueball.png"
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "x-uuencode",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "blueball.png"
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+23
-34
@@ -132,17 +132,18 @@ end
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"message_id": {
|
||||||
"year": 2000,
|
"Text": "NDBBIAKOPKHFGPLCODIGIEKGCHAA.doug@example.com"
|
||||||
"month": 5,
|
},
|
||||||
"day": 17,
|
"to": {
|
||||||
"hour": 19,
|
"Address": {
|
||||||
"minute": 58,
|
"name": "Joe Blow",
|
||||||
"second": 13,
|
"address": "jblow@example.com"
|
||||||
"tz_before_gmt": true,
|
}
|
||||||
"tz_hour": 4,
|
},
|
||||||
"tz_minute": 0
|
"subject": {
|
||||||
|
"Text": "Test message from Microsoft Outlook 00"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -150,30 +151,18 @@ end
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGIEKGCHAA.doug@example.com",
|
"date": {
|
||||||
"subject": "Test message from Microsoft Outlook 00",
|
"DateTime": {
|
||||||
"to": {
|
"year": 2000,
|
||||||
"Address": {
|
"month": 5,
|
||||||
"name": "Joe Blow",
|
"day": 17,
|
||||||
"address": "jblow@example.com"
|
"hour": 19,
|
||||||
|
"minute": 58,
|
||||||
|
"second": 13,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+84
-65
@@ -110,17 +110,41 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Heinz Müller",
|
||||||
|
"address": "mueller@example.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 2000,
|
"DateTime": {
|
||||||
"month": 5,
|
"year": 2000,
|
||||||
"day": 19,
|
"month": 5,
|
||||||
"hour": 0,
|
"day": 19,
|
||||||
"minute": 39,
|
"hour": 0,
|
||||||
"second": 36,
|
"minute": 39,
|
||||||
"tz_before_gmt": true,
|
"second": 36,
|
||||||
"tz_hour": 4,
|
"tz_before_gmt": true,
|
||||||
"tz_minute": 0
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "related",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_715546120==_.REL",
|
||||||
|
"type": "text/html"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -128,44 +152,23 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com",
|
"mime_version": {
|
||||||
"mime_version": "1.0",
|
"Text": "1.0"
|
||||||
"subject": "Die Hasen und die Frösche",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Heinz Müller",
|
|
||||||
"address": "mueller@example.com"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "related",
|
|
||||||
"attributes": {
|
|
||||||
"type": "text/html",
|
|
||||||
"boundary": "=====================_715546120==_.REL"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "html",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "html",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -180,21 +183,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "2aa658b6.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa658b6.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "base64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "inline",
|
||||||
"c_type": "image",
|
"attributes": {
|
||||||
"c_subtype": "png",
|
"filename": "2aa658b6.png"
|
||||||
"attributes": {
|
}
|
||||||
"name": "2aa658b6.png"
|
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.2"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
@@ -1528,21 +1539,29 @@ IFl2ZXMgUGlndWV0NnM7vAAAAABJRU5ErkJggg==
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "inline",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "inline",
|
||||||
"filename": "2aa658c0.png"
|
"attributes": {
|
||||||
|
"filename": "2aa658c0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3",
|
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "2aa658c0.png"
|
"attributes": {
|
||||||
|
"name": "2aa658c0.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003934.00a866f0@pop.example.com.3"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": [
|
"contents": [
|
||||||
|
|||||||
+113
-82
@@ -162,17 +162,21 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"subject": {
|
||||||
"year": 2000,
|
"Text": "Die Hasen und die Frösche"
|
||||||
"month": 5,
|
},
|
||||||
"day": 19,
|
"mime_version": {
|
||||||
"hour": 0,
|
"Text": "1.0"
|
||||||
"minute": 39,
|
},
|
||||||
"second": 5,
|
"content_type": {
|
||||||
"tz_before_gmt": true,
|
"ContentType": {
|
||||||
"tz_hour": 4,
|
"c_type": "multipart",
|
||||||
"tz_minute": 0
|
"c_subtype": "mixed",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "=====================_715515186==_"
|
||||||
|
}
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -180,32 +184,27 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"address": "dwsauder@example.com"
|
"address": "dwsauder@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Frösche",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 19,
|
||||||
|
"hour": 0,
|
||||||
|
"minute": 39,
|
||||||
|
"second": 5,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "=====================_715515186==_"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-Mailer": [
|
|
||||||
"QUALCOMM Windows Eudora Pro Version 4.2.0.58"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"2 (High)"
|
|
||||||
],
|
|
||||||
"X-Sender": [
|
|
||||||
"dwsauder@pop.example.com (Unverified)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -215,14 +214,18 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "iso-8859-1"
|
"attributes": {
|
||||||
|
"charset": "iso-8859-1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa5e03a.png2aa5e044.png"
|
"contents": "Die Hasen und die Frösche\n\nDie Hasen klagten einst über ihre mißliche Lage; \"wir leben\", sprach ein Redner, \"in steter Furcht vor Menschen und Tieren, eine Beute der Hunde, der Adler, ja fast aller Raubtiere! Unsere stete Angst ist ärger als der Tod selbst. Auf, laßt uns ein für allemal sterben.\" \n\nIn einem nahen Teich wollten sie sich nun ersäufen; sie eilten ihm zu; allein das außerordentliche Getöse und ihre wunderbare Gestalt erschreckte eine Menge Frösche, die am Ufer saßen, so sehr, daß sie aufs schnellste untertauchten. \n\n\"Halt\", rief nun eben dieser Sprecher, \"wir wollen das Ersäufen noch ein wenig aufschieben, denn auch uns fürchten, wie ihr seht, einige Tiere, welche also wohl noch unglücklicher sein müssen als wir.\" \n\n2aa5e03a.png2aa5e044.png"
|
||||||
@@ -231,20 +234,28 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "2aa5e03a.png"
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa5e03a.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com.2",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "base64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "inline",
|
||||||
"c_type": "image",
|
"attributes": {
|
||||||
"c_subtype": "png",
|
"filename": "2aa5e03a.png"
|
||||||
"attributes": {
|
}
|
||||||
"name": "2aa5e03a.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -1579,20 +1590,28 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"filename": "2aa5e044.png"
|
"content_id": {
|
||||||
|
"Text": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "2aa5e044.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_id": "4.2.0.58.20000519003903.00a859b0@pop.example.com.3",
|
"content_disposition": {
|
||||||
"content_transfer_encoding": "base64",
|
"ContentType": {
|
||||||
"content_type": {
|
"c_type": "inline",
|
||||||
"c_type": "image",
|
"attributes": {
|
||||||
"c_subtype": "png",
|
"filename": "2aa5e044.png"
|
||||||
"attributes": {
|
}
|
||||||
"name": "2aa5e044.png"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -3055,19 +3074,25 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_type": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "image",
|
||||||
"filename": "blueball.png"
|
"c_subtype": "png",
|
||||||
|
"attributes": {
|
||||||
|
"name": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "base64"
|
||||||
"c_type": "image",
|
},
|
||||||
"c_subtype": "png",
|
"content_disposition": {
|
||||||
"attributes": {
|
"ContentType": {
|
||||||
"name": "blueball.png"
|
"c_type": "attachment",
|
||||||
|
"attributes": {
|
||||||
|
"filename": "blueball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -4402,19 +4427,25 @@ bGlwMmdpZiB2LjAuNiBieSBZdmVzIFBpZ3VldDZzO7wAAAAASUVORK5CYII=
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_disposition": {
|
"content_disposition": {
|
||||||
"c_type": "attachment",
|
"ContentType": {
|
||||||
"attributes": {
|
"c_type": "attachment",
|
||||||
"filename": "greenball.png"
|
"attributes": {
|
||||||
|
"filename": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "png",
|
"c_type": "image",
|
||||||
"attributes": {
|
"c_subtype": "png",
|
||||||
"name": "greenball.png"
|
"attributes": {
|
||||||
|
"name": "greenball.png"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+22
-33
@@ -28,48 +28,37 @@ welche also wohl noch ungl
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"message_id": {
|
||||||
"year": 2000,
|
"Text": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 28,
|
|
||||||
"second": 40,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"subject": {
|
||||||
"Address": {
|
"Text": "Die Hasen und die Fr�sche (Microsoft Outlook 00)"
|
||||||
"name": "Doug Sauder",
|
},
|
||||||
"address": "doug@example.com"
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 28,
|
||||||
|
"second": 40,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGOEKDCHAA.doug@example.com",
|
|
||||||
"subject": "Die Hasen und die Fr�sche (Microsoft Outlook 00)",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz M�ller",
|
"name": "Heinz M�ller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"others": {
|
"from": {
|
||||||
"X-MSMail-Priority": [
|
"Address": {
|
||||||
"Normal"
|
"name": "Doug Sauder",
|
||||||
],
|
"address": "doug@example.com"
|
||||||
"X-MimeOLE": [
|
}
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+33
-38
@@ -33,17 +33,9 @@ als wir."=20
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_transfer_encoding": {
|
||||||
"year": 2000,
|
"Text": "quoted-printable"
|
||||||
"month": 5,
|
|
||||||
"day": 17,
|
|
||||||
"hour": 19,
|
|
||||||
"minute": 27,
|
|
||||||
"second": 4,
|
|
||||||
"tz_before_gmt": true,
|
|
||||||
"tz_hour": 4,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -51,39 +43,42 @@ als wir."=20
|
|||||||
"address": "doug@example.com"
|
"address": "doug@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com",
|
"date": {
|
||||||
"mime_version": "1.0",
|
"DateTime": {
|
||||||
"subject": "Die Hasen und die Frösche (Microsoft Outlook 00)",
|
"year": 2000,
|
||||||
|
"month": 5,
|
||||||
|
"day": 17,
|
||||||
|
"hour": 19,
|
||||||
|
"minute": 27,
|
||||||
|
"second": 4,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 4,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "NDBBIAKOPKHFGPLCODIGKEKDCHAA.doug@example.com"
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Die Hasen und die Frösche (Microsoft Outlook 00)"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain",
|
||||||
|
"attributes": {
|
||||||
|
"charset": "utf-8"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Heinz Müller",
|
"name": "Heinz Müller",
|
||||||
"address": "mueller@example.com"
|
"address": "mueller@example.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "quoted-printable",
|
"mime_version": {
|
||||||
"content_type": {
|
"Text": "1.0"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "utf-8"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"others": {
|
|
||||||
"X-MimeOLE": [
|
|
||||||
"Produced By Microsoft MimeOLE V5.00.2314.1300"
|
|
||||||
],
|
|
||||||
"X-MSMail-Priority": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Mailer": [
|
|
||||||
"Microsoft Outlook IMO, Build 9.0.2416 (9.0.2910.0)"
|
|
||||||
],
|
|
||||||
"Importance": [
|
|
||||||
"Normal"
|
|
||||||
],
|
|
||||||
"X-Priority": [
|
|
||||||
"3 (Normal)"
|
|
||||||
]
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ Content-Type: text/html
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": ":foo"
|
"attributes": {
|
||||||
|
"boundary": ":foo"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -11,12 +11,14 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "ab"
|
"attributes": {
|
||||||
|
"boundary": "ab"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -4,12 +4,14 @@ body
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "ab"
|
"attributes": {
|
||||||
|
"boundary": "ab"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+12
-8
@@ -10,22 +10,26 @@ body
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a"
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "body\n"
|
"contents": "body\n"
|
||||||
|
|||||||
@@ -10,12 +10,14 @@ body
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a"
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+12
-8
@@ -14,12 +14,14 @@ body2
|
|||||||
--a----
|
--a----
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a--"
|
"attributes": {
|
||||||
|
"boundary": "a--"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -30,10 +32,12 @@ body2
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "body"
|
"contents": "body"
|
||||||
|
|||||||
+12
-8
@@ -10,22 +10,26 @@ body
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a"
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "body\n"
|
"contents": "body\n"
|
||||||
|
|||||||
@@ -12,12 +12,14 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "a"
|
"attributes": {
|
||||||
|
"boundary": "a"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+12
-8
@@ -14,22 +14,26 @@ body2
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "ab"
|
"attributes": {
|
||||||
|
"boundary": "ab"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "body\n--ab\nContent-Type: text/html\n\nbody2\n"
|
"contents": "body\n--ab\nContent-Type: text/html\n\nbody2\n"
|
||||||
|
|||||||
+17
-11
@@ -18,12 +18,14 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "1"
|
"attributes": {
|
||||||
|
"boundary": "1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -34,10 +36,12 @@ Content-Type: text/plain
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "1"
|
"contents": "1"
|
||||||
@@ -46,10 +50,12 @@ Content-Type: text/plain
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "22\n--1\nContent-Type: text/plain\n\n333\n"
|
"contents": "22\n--1\nContent-Type: text/plain\n\n333\n"
|
||||||
|
|||||||
+15
-9
@@ -8,28 +8,34 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "message",
|
"ContentType": {
|
||||||
"c_subtype": "rfc822"
|
"c_type": "message",
|
||||||
|
"c_subtype": "rfc822"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Message": {
|
"Message": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "message",
|
"ContentType": {
|
||||||
"c_subtype": "rfc822"
|
"c_type": "message",
|
||||||
|
"c_subtype": "rfc822"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Message": {
|
"Message": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+17
-11
@@ -18,12 +18,14 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "1"
|
"attributes": {
|
||||||
|
"boundary": "1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -34,10 +36,12 @@ Content-Type: text/plain
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "1"
|
"contents": "1"
|
||||||
@@ -46,10 +50,12 @@ Content-Type: text/plain
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "22\n--1\nContent-Type: text/plain\n\n333\n"
|
"contents": "22\n--1\nContent-Type: text/plain\n\n333\n"
|
||||||
|
|||||||
+17
-11
@@ -24,22 +24,26 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "1"
|
"attributes": {
|
||||||
|
"boundary": "1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Message": {
|
"Message": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -56,10 +60,12 @@ Content-Type: text/plain
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Message": {
|
"Message": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
|
|||||||
+30
-18
@@ -33,14 +33,18 @@ hello, world
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"mime_version": "1.0",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "1"
|
"attributes": {
|
||||||
|
"boundary": "1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -59,37 +63,45 @@ hello, world
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "hello, world"
|
"contents": "hello, world"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "hello, world"
|
"contents": "hello, world"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "hello, world"
|
"contents": "hello, world"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "hello, world"
|
"contents": "hello, world"
|
||||||
|
|||||||
+12
-8
@@ -8,12 +8,14 @@ hello, world
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "1"
|
"attributes": {
|
||||||
|
"boundary": "1"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -24,10 +26,12 @@ hello, world
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "hello, world"
|
"contents": "hello, world"
|
||||||
|
|||||||
+55
-39
@@ -26,30 +26,7 @@ invalid
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
|
||||||
"year": 2007,
|
|
||||||
"month": 5,
|
|
||||||
"day": 23,
|
|
||||||
"hour": 4,
|
|
||||||
"minute": 58,
|
|
||||||
"second": 8,
|
|
||||||
"tz_before_gmt": false,
|
|
||||||
"tz_hour": 3,
|
|
||||||
"tz_minute": 0
|
|
||||||
},
|
|
||||||
"from": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Test User",
|
|
||||||
"address": "test@example.org"
|
|
||||||
}
|
|
||||||
},
|
|
||||||
"message_id": "1.2.3.4@example",
|
|
||||||
"mime_version": "1.0",
|
|
||||||
"return_path": [
|
|
||||||
"test@example.org"
|
|
||||||
],
|
|
||||||
"subject": "Hello world",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Another User",
|
"name": "Another User",
|
||||||
@@ -57,13 +34,46 @@ invalid
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "signed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "signed",
|
||||||
"boundary": "=-GNQXLhuj24Pl1aCkk4/d",
|
"attributes": {
|
||||||
"protocol": "application/pgp-signature",
|
"micalg": "pgp-sha1",
|
||||||
"micalg": "pgp-sha1"
|
"protocol": "application/pgp-signature",
|
||||||
|
"boundary": "=-GNQXLhuj24Pl1aCkk4/d"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"return_path": {
|
||||||
|
"Text": "test@example.org"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Test User",
|
||||||
|
"address": "test@example.org"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "1.2.3.4@example"
|
||||||
|
},
|
||||||
|
"date": {
|
||||||
|
"DateTime": {
|
||||||
|
"year": 2007,
|
||||||
|
"month": 5,
|
||||||
|
"day": 23,
|
||||||
|
"hour": 4,
|
||||||
|
"minute": 58,
|
||||||
|
"second": 8,
|
||||||
|
"tz_before_gmt": false,
|
||||||
|
"tz_hour": 3,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Hello world"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -73,11 +83,15 @@ invalid
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "quoted-printable",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "quoted-printable"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "There was a day \na happy day\n"
|
"contents": "There was a day \na happy day\n"
|
||||||
@@ -86,12 +100,14 @@ invalid
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "application",
|
"ContentType": {
|
||||||
"c_subtype": "pgp-signature",
|
"c_type": "application",
|
||||||
"attributes": {
|
"c_subtype": "pgp-signature",
|
||||||
"name": "signature.asc"
|
"attributes": {
|
||||||
|
"name": "signature.asc"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+17
-11
@@ -25,12 +25,14 @@ Content-Type: text/plain
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "1234567890123456789012345678901234567890123456789012345678901234567890123456789012"
|
"attributes": {
|
||||||
|
"boundary": "1234567890123456789012345678901234567890123456789012345678901234567890123456789012"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -41,10 +43,12 @@ Content-Type: text/plain
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333"
|
"contents": "1\n--1234567890123456789012345678901234567890123456789012345678901234567890123456789012\nContent-Type: text/plain\n\n22\n--123456789012345678901234567890123456789012345678901234567890123456789012345678901\nContent-Type: text/plain\n\n333"
|
||||||
@@ -53,10 +57,12 @@ Content-Type: text/plain
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain"
|
"c_type": "text",
|
||||||
|
"c_subtype": "plain"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "4444\n"
|
"contents": "4444\n"
|
||||||
|
|||||||
+76
-50
@@ -73,17 +73,24 @@ Content-Transfer-Encoding: Quoted-printable
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"date": {
|
"content_type": {
|
||||||
"year": 1994,
|
"ContentType": {
|
||||||
"month": 10,
|
"c_type": "multipart",
|
||||||
"day": 7,
|
"c_subtype": "mixed",
|
||||||
"hour": 16,
|
"attributes": {
|
||||||
"minute": 15,
|
"boundary": "unique-boundary-1"
|
||||||
"second": 5,
|
}
|
||||||
"tz_before_gmt": true,
|
}
|
||||||
"tz_hour": 7,
|
},
|
||||||
"tz_minute": 0
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Ned Freed",
|
||||||
|
"address": "ned@innosoft.com"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -91,19 +98,20 @@ Content-Transfer-Encoding: Quoted-printable
|
|||||||
"address": "nsb@nsb.fv.com"
|
"address": "nsb@nsb.fv.com"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"mime_version": "1.0",
|
"subject": {
|
||||||
"subject": "A multipart example",
|
"Text": "A multipart example"
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "Ned Freed",
|
|
||||||
"address": "ned@innosoft.com"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"content_type": {
|
"date": {
|
||||||
"c_type": "multipart",
|
"DateTime": {
|
||||||
"c_subtype": "mixed",
|
"year": 1994,
|
||||||
"attributes": {
|
"month": 10,
|
||||||
"boundary": "unique-boundary-1"
|
"day": 7,
|
||||||
|
"hour": 16,
|
||||||
|
"minute": 15,
|
||||||
|
"second": 5,
|
||||||
|
"tz_before_gmt": true,
|
||||||
|
"tz_hour": 7,
|
||||||
|
"tz_minute": 0
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -120,12 +128,14 @@ Content-Transfer-Encoding: Quoted-printable
|
|||||||
"contents": "... Some text appears here ...\n\n[Note that the blank between the boundary and the start\nof the text in this part means no header fields were\ngiven and this is text in the US-ASCII character set.\nIt could have been done with explicit typing as in the\nnext part.]\n"
|
"contents": "... Some text appears here ...\n\n[Note that the blank between the boundary and the start\nof the text in this part means no header fields were\ngiven and this is text in the US-ASCII character set.\nIt could have been done with explicit typing as in the\nnext part.]\n"
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "US-ASCII"
|
"attributes": {
|
||||||
|
"charset": "US-ASCII"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -135,34 +145,44 @@ Content-Transfer-Encoding: Quoted-printable
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "base64",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "audio",
|
"ContentType": {
|
||||||
"c_subtype": "basic"
|
"c_type": "audio",
|
||||||
|
"c_subtype": "basic"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": ".. base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n"
|
"contents": "... base64-encoded 8000 Hz single-channel\n mu-law-format audio data goes here ...\n"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "base64",
|
"content_transfer_encoding": {
|
||||||
|
"Text": "base64"
|
||||||
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "image",
|
"ContentType": {
|
||||||
"c_subtype": "jpeg"
|
"c_type": "image",
|
||||||
|
"c_subtype": "jpeg"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": ".. base64-encoded image data goes here ...\n"
|
"contents": "... base64-encoded image data goes here ...\n"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Text": {
|
"Text": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "enriched"
|
"c_type": "text",
|
||||||
|
"c_subtype": "enriched"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "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"
|
"contents": "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"
|
||||||
@@ -170,25 +190,31 @@ Content-Transfer-Encoding: Quoted-printable
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Message": {
|
"Message": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"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"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"subject": "(subject in US-ASCII)",
|
"subject": {
|
||||||
|
"Text": "(subject in US-ASCII)"
|
||||||
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "address in US-ASCII"
|
"name": "address in US-ASCII"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "Quoted-printable",
|
"content_transfer_encoding": {
|
||||||
"content_type": {
|
"Text": "Quoted-printable"
|
||||||
"c_type": "text",
|
|
||||||
"c_subtype": "plain",
|
|
||||||
"attributes": {
|
|
||||||
"charset": "ISO-8859-1"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
|
|||||||
+53
-37
@@ -41,43 +41,55 @@ get RFC-MIME.DOC
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
|
"subject": {
|
||||||
|
"Text": "whatever"
|
||||||
|
},
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.0"
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "id1@host.com"
|
||||||
|
},
|
||||||
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "multipart",
|
||||||
|
"c_subtype": "alternative",
|
||||||
|
"attributes": {
|
||||||
|
"boundary": "42"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Whomever"
|
"name": "Whomever"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "id1@host.com",
|
"content_id": {
|
||||||
"mime_version": "1.0",
|
"Text": "id001@guppylake.bellcore.com"
|
||||||
"subject": "whatever",
|
},
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "Someone"
|
"name": "Someone"
|
||||||
}
|
}
|
||||||
},
|
|
||||||
"content_id": "id001@guppylake.bellcore.com",
|
|
||||||
"content_type": {
|
|
||||||
"c_type": "multipart",
|
|
||||||
"c_subtype": "alternative",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "42"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "message",
|
"ContentType": {
|
||||||
"c_subtype": "external-body",
|
"c_type": "message",
|
||||||
"attributes": {
|
"c_subtype": "external-body",
|
||||||
"name": "BodyFormats.ps",
|
"attributes": {
|
||||||
"mode": "image",
|
"name": "BodyFormats.ps",
|
||||||
"access-type": "ANON-FTP",
|
"mode": "image",
|
||||||
"directory": "pub",
|
"site": "thumper.bellcore.com",
|
||||||
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
|
"directory": "pub",
|
||||||
"site": "thumper.bellcore.com"
|
"access-type": "ANON-FTP",
|
||||||
|
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -166,15 +178,17 @@ get RFC-MIME.DOC
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "message",
|
"ContentType": {
|
||||||
"c_subtype": "external-body",
|
"c_type": "message",
|
||||||
"attributes": {
|
"c_subtype": "external-body",
|
||||||
"access-type": "local-file",
|
"attributes": {
|
||||||
"name": "/u/nsb/writing/rfcs/RFC-MIME.ps",
|
"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)",
|
||||||
"site": "thumper.bellcore.com"
|
"access-type": "local-file",
|
||||||
|
"site": "thumper.bellcore.com"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -263,14 +277,16 @@ get RFC-MIME.DOC
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"Binary": {
|
"Binary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "message",
|
"ContentType": {
|
||||||
"c_subtype": "external-body",
|
"c_type": "message",
|
||||||
"attributes": {
|
"c_subtype": "external-body",
|
||||||
"access-type": "mail-server",
|
"attributes": {
|
||||||
"server": "listserv@bogus.bitnet",
|
"access-type": "mail-server",
|
||||||
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)"
|
"expiration": "Fri, 14 Jun 1991 19:13:14 -0400 (EDT)",
|
||||||
|
"server": "listserv@bogus.bitnet"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
+98
-64
@@ -73,14 +73,10 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
|
|||||||
|
|
||||||
---- EXPECTED STRUCTURE ----
|
---- EXPECTED STRUCTURE ----
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"from": {
|
"subject": {
|
||||||
"Address": {
|
"Text": "[Fwd: Map of Argentina with Description]"
|
||||||
"name": "Al Gore",
|
|
||||||
"address": "vice-president@whitehouse.gov"
|
|
||||||
}
|
|
||||||
},
|
},
|
||||||
"subject": "[Fwd: Map of Argentina with Description]",
|
|
||||||
"to": {
|
"to": {
|
||||||
"Address": {
|
"Address": {
|
||||||
"name": "White House Transportation Coordinator",
|
"name": "White House Transportation Coordinator",
|
||||||
@@ -88,10 +84,18 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "multipart",
|
"ContentType": {
|
||||||
"c_subtype": "mixed",
|
"c_type": "multipart",
|
||||||
"attributes": {
|
"c_subtype": "mixed",
|
||||||
"boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872"
|
"attributes": {
|
||||||
|
"boundary": "D7F------------D7FD5A0B8AB9C65CCDBFA872"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"from": {
|
||||||
|
"Address": {
|
||||||
|
"name": "Al Gore",
|
||||||
|
"address": "vice-president@whitehouse.gov"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -102,14 +106,18 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl"
|
"contents": "Fred,\n\nFire up Air Force One! We're going South!\n\nThanks,\nAl"
|
||||||
@@ -118,17 +126,44 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"Message": {
|
"Message": {
|
||||||
"header": {
|
"headers": {
|
||||||
|
"mime_version": {
|
||||||
|
"Text": "1.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"
|
||||||
|
}
|
||||||
|
]
|
||||||
|
},
|
||||||
|
"message_id": {
|
||||||
|
"Text": "199804130742.RAA20366@mai1host.whitehouse.gov"
|
||||||
|
},
|
||||||
|
"to": {
|
||||||
|
"Address": {
|
||||||
|
"name": "A1 Gore (The Enforcer)",
|
||||||
|
"address": "vice-president@whitehouse.gov"
|
||||||
|
}
|
||||||
|
},
|
||||||
|
"subject": {
|
||||||
|
"Text": "Map of Argentina with Description"
|
||||||
|
},
|
||||||
"date": {
|
"date": {
|
||||||
"year": 1998,
|
"DateTime": {
|
||||||
"month": 8,
|
"year": 1998,
|
||||||
"day": 13,
|
"month": 8,
|
||||||
"hour": 17,
|
"day": 13,
|
||||||
"minute": 42,
|
"hour": 17,
|
||||||
"second": 41,
|
"minute": 42,
|
||||||
"tz_before_gmt": false,
|
"second": 41,
|
||||||
"tz_hour": 10,
|
"tz_before_gmt": false,
|
||||||
"tz_minute": 0
|
"tz_hour": 10,
|
||||||
|
"tz_minute": 0
|
||||||
|
}
|
||||||
},
|
},
|
||||||
"from": {
|
"from": {
|
||||||
"Address": {
|
"Address": {
|
||||||
@@ -136,28 +171,17 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
|
|||||||
"address": "president@whitehouse.gov"
|
"address": "president@whitehouse.gov"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"message_id": "199804130742.RAA20366@mai1host.whitehouse.gov",
|
"content_type": {
|
||||||
"mime_version": "1.0",
|
"ContentType": {
|
||||||
"received": [
|
"c_type": "multipart",
|
||||||
"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",
|
"c_subtype": "mixed",
|
||||||
"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"
|
"attributes": {
|
||||||
],
|
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
|
||||||
"return_path": [
|
}
|
||||||
"president@whitehouse.gov"
|
|
||||||
],
|
|
||||||
"subject": "Map of Argentina with Description",
|
|
||||||
"to": {
|
|
||||||
"Address": {
|
|
||||||
"name": "A1 Gore (The Enforcer)",
|
|
||||||
"address": "vice-president@whitehouse.gov"
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_type": {
|
"return_path": {
|
||||||
"c_type": "multipart",
|
"Text": "president@whitehouse.gov"
|
||||||
"c_subtype": "mixed",
|
|
||||||
"attributes": {
|
|
||||||
"boundary": "DC8------------DC8638F443D87A7F0726DEF7"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"html_body": [
|
"html_body": [
|
||||||
@@ -168,14 +192,18 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
|
|||||||
],
|
],
|
||||||
"text_body": [
|
"text_body": [
|
||||||
{
|
{
|
||||||
"header": {
|
"headers": {
|
||||||
"content_transfer_encoding": "7bit",
|
|
||||||
"content_type": {
|
"content_type": {
|
||||||
"c_type": "text",
|
"ContentType": {
|
||||||
"c_subtype": "plain",
|
"c_type": "text",
|
||||||
"attributes": {
|
"c_subtype": "plain",
|
||||||
"charset": "us-ascii"
|
"attributes": {
|
||||||
|
"charset": "us-ascii"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
},
|
||||||
|
"content_transfer_encoding": {
|
||||||
|
"Text": "7bit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"contents": "Hi A1,\n\nI finally figured out this MIME thing. Pretty cool. I'll send you\nsome sax music in .au files next week!\n\nAnyway, the attached image is really too small to get a good look at\nArgentina. Try this for a much better map:\n\n http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm\n\nThen again, shouldn't the CIA have something like that?\n\nBill"
|
"contents": "Hi A1,\n\nI finally figured out this MIME thing. Pretty cool. I'll send you\nsome sax music in .au files next week!\n\nAnyway, the attached image is really too small to get a good look at\nArgentina. Try this for a much better map:\n\n http://www.1one1yp1anet.com/dest/sam/graphics/map-arg.htm\n\nThen again, shouldn't the CIA have something like that?\n\nBill"
|
||||||
@@ -185,19 +213,25 @@ U6ZGxseyk8SasGw3J9GRzdTQky1iHNvcPNNI4TLeKdfMvy0vMqLrItvuxfDW8ubjueDtJufz
|
|||||||
"attachments": [
|
"attachments": [
|
||||||
{
|
{
|
||||||
"InlineBinary": {
|
"InlineBinary": {
|
||||||
"header": {
|
"headers": {
|
||||||
"content_disposition": {
|
"content_transfer_encoding": {
|
||||||
"c_type": "inline",
|
"Text": "base64"
|
||||||
"attributes": {
|
},
|
||||||
"fi1ename": "map_of_Argentina.gif"
|
"content_type": {
|
||||||
|
"ContentType": {
|
||||||
|
"c_type": "image",
|
||||||
|
"c_subtype": "gif",
|
||||||
|
"attributes": {
|
||||||
|
"name": "map_of_Argentina.gif"
|
||||||
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"content_transfer_encoding": "base64",
|
"content_disposition": {
|
||||||
"content_type": {
|
"ContentType": {
|
||||||
"c_type": "image",
|
"c_type": "inline",
|
||||||
"c_subtype": "gif",
|
"attributes": {
|
||||||
"attributes": {
|
"fi1ename": "map_of_Argentina.gif"
|
||||||
"name": "map_of_Argentina.gif"
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user