diff options
author | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-30 19:23:55 +0300 |
---|---|---|
committer | Manos Pitsidianakis <el13635@mail.ntua.gr> | 2019-07-30 19:23:55 +0300 |
commit | 572944e9172b2a1a2eefbb43813403c06c50f48c (patch) | |
tree | d27c410ff1129927795a56133a65f2b882f846be | |
parent | 4f5bcfd1d4681356cb5223f1bdf93e2c632b19e3 (diff) |
melib: add version from Cargo manifest to User-Agent field
-rw-r--r-- | melib/src/email/compose.rs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/melib/src/email/compose.rs b/melib/src/email/compose.rs index 6c67db00..883ab4c7 100644 --- a/melib/src/email/compose.rs +++ b/melib/src/email/compose.rs @@ -33,7 +33,10 @@ impl Default for Draft { let now: DateTime<Local> = Local::now(); headers.insert("Date".into(), now.to_rfc2822()); headers.insert("Subject".into(), "".into()); - headers.insert("User-Agent".into(), "meli 0.0".into()); + headers.insert( + "User-Agent".into(), + format!("meli {}", option_env!("CARGO_PKG_VERSION").unwrap_or("0.0")), + ); header_order.push("Date".into()); header_order.push("From".into()); header_order.push("To".into()); |