2023-06-13 17:35:41 +00:00
|
|
|
use imf_codec::common_fields;
|
2023-06-08 12:58:20 +00:00
|
|
|
|
|
|
|
fn main() {
|
2023-06-13 11:52:34 +00:00
|
|
|
let header = r#"Date: Fri, 21 Nov 1997 10:01:10 -0600
|
|
|
|
From: Mary Smith
|
|
|
|
<mary@example.net>
|
2023-06-13 11:42:50 +00:00
|
|
|
Sender: imf@example.com
|
2023-06-13 11:52:34 +00:00
|
|
|
Reply-To: "Mary Smith: Personal Account" <smith@home.example>
|
|
|
|
To: John Doe <jdoe@machine.example>
|
2023-06-13 12:44:41 +00:00
|
|
|
Cc: imf2@example.com
|
|
|
|
Bcc: (hidden)
|
2023-06-13 11:52:34 +00:00
|
|
|
Subject: Re: Saying Hello
|
2023-06-13 14:22:04 +00:00
|
|
|
Comments: A simple message
|
|
|
|
Comments: Not that complicated
|
|
|
|
Keywords: hello, world
|
|
|
|
Keywords: salut, le, monde
|
2023-06-13 11:52:34 +00:00
|
|
|
Message-ID: <3456@example.net>
|
|
|
|
In-Reply-To: <1234@local.machine.example>
|
|
|
|
References: <1234@local.machine.example>
|
2023-06-13 11:42:50 +00:00
|
|
|
|
2023-06-13 11:52:34 +00:00
|
|
|
This is a reply to your hello.
|
2023-06-13 11:42:50 +00:00
|
|
|
"#;
|
|
|
|
|
2023-06-13 17:35:41 +00:00
|
|
|
println!("{:?}", common_fields::section(header));
|
2023-06-08 12:58:20 +00:00
|
|
|
}
|