crabmail

Static HTML email archive viewer in Rust
git clone git://git.alexwennerberg.com/crabmail
Log | Files | Refs | README | LICENSE

commit fcaae8942531ea1f8faa339467501e1d7cea8e59
parent 55821627e75f2e9fa07f848d7aa6d733ff8c7bb6
Author: alex wennerberg <alex@alexwennerberg.com>
Date:   Sat, 19 Mar 2022 17:34:35 -0700

 add eml export

Diffstat:
Msrc/main.rs | 2+-
Msrc/templates/html.rs | 3++-
2 files changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/main.rs b/src/main.rs @@ -130,7 +130,7 @@ impl List { }); for msg in thread.messages { let base_path = message_dir.join(&msg.pathescape_msg_id()); - write_if_unchanged(&&append_ext("eml", &base_path), &msg.export_eml()); + write_if_unchanged(&append_ext("eml", &base_path), &msg.export_eml()); } } self.thread_topics.sort_by_key(|t| t.last_reply); diff --git a/src/templates/html.rs b/src/templates/html.rs @@ -192,7 +192,7 @@ impl Thread { {extra_headers} </details> <a class="bold" href="tbd">Reply</a> - [<a href="tbd.eml">Download</a>] + [<a href="../messages/{msg_path}.eml">Download</a>] </div> <div class="email-body"> {body} @@ -204,6 +204,7 @@ impl Thread { ms, &[ ("msg_id", &x(&msg.id)), + ("msg_path", &x(msg.pathescape_msg_id().to_str().unwrap())), ("subject", &x(&msg.subject)), ("from", &msg.from.to_html()), ("date", &x(&msg.date)),