Skip to content

Commit

Permalink
Include conversion notes in generated headers
Browse files Browse the repository at this point in the history
  • Loading branch information
emk committed Jun 30, 2010
1 parent 2a01e5e commit 93d500c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
6 changes: 6 additions & 0 deletions rfc822.cpp
Expand Up @@ -209,6 +209,12 @@ void document_to_rfc822(ostream &out, const document &d) {
out << header("CC", any_cast<vector<wstring> >(d[L"#CC"])) << crlf;
if (!d[L"#BCC"].empty())
out << header("BCC", any_cast<vector<wstring> >(d[L"#BCC"])) << crlf;
out << "X-Note: Exported from PST by "
<< "http://github.com/aranetic/process-pst" << crlf;
if (!d[L"#Header"].empty())
out << "X-Note: See load file metadata for original headers" << crlf;


out << crlf;
}

4 changes: 4 additions & 0 deletions rfc822_spec.cpp
Expand Up @@ -136,6 +136,7 @@ void document_to_rfc822_should_include_headers_text_and_html() {

d[L"#Subject"] = wstring(L"Re: The fridge");
d[L"#DateSent"] = from_iso_string("20020131T235959Z");
d[L"#Header"] = wstring(L"Subject: Re: the fridge\r\n");

// TODO: Text body
// TODO: HTML body
Expand All @@ -148,6 +149,9 @@ void document_to_rfc822_should_include_headers_text_and_html() {
"CC: Baz <baz@example.com>,\r\n"
" Moby <moby@example.com>\r\n"
"BCC: Quux <quux@example.com>\r\n"
"X-Note: Exported from PST by"
" http://github.com/aranetic/process-pst\r\n"
"X-Note: See load file metadata for original headers\r\n"
"\r\n";
ostringstream out;
document_to_rfc822(out, d);
Expand Down

0 comments on commit 93d500c

Please sign in to comment.