diff --git a/Cargo.lock b/Cargo.lock index 98f3328..34db093 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -767,9 +767,9 @@ dependencies = [ [[package]] name = "clap" -version = "4.5.54" +version = "4.5.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c6e6ff9dcd79cff5cd969a17a545d79e84ab086e444102a591e288a8aa3ce394" +checksum = "a75ca66430e33a14957acc24c5077b503e7d374151b2b4b3a10c83b4ceb4be0e" dependencies = [ "clap_builder", "clap_derive", @@ -777,9 +777,9 @@ dependencies = [ [[package]] name = "clap_builder" -version = "4.5.54" +version = "4.5.56" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fa42cf4d2b7a41bc8f663a7cab4031ebafa1bf3875705bfaf8466dc60ab52c00" +checksum = "793207c7fa6300a0608d1080b858e5fdbe713cdc1c8db9fb17777d8a13e63df0" dependencies = [ "anstream", "anstyle", @@ -789,9 +789,9 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.5.49" +version = "4.5.55" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2a0b5487afeab2deb2ff4e03a807ad1a03ac532ff5a2cee5d86884440c7f7671" +checksum = "a92793da1a46a5f2a02a6f4c46c6496b28c43638adea8306fcb0caa1634f24e5" dependencies = [ "heck 0.5.0", "proc-macro2", @@ -1892,9 +1892,9 @@ dependencies = [ [[package]] name = "html2text" -version = "0.16.6" +version = "0.16.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ea4ba4c0f993633569337a4fadfbd4f27448c81adb1af0c2407065f52809662" +checksum = "12d23156ea4dbe6b37ad48fab2da56ff27b0f6192fb5db210c44eb07bfe6e787" dependencies = [ "html5ever", "tendril", @@ -1904,9 +1904,9 @@ dependencies = [ [[package]] name = "html5ever" -version = "0.37.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5935f02fdc02823ff15fec27c2b3d7ca19d629e996f7a0ae4d7d500e62e54c76" +checksum = "1054432bae2f14e0061e33d23402fbaa67a921d319d56adc6bcf887ddad1cbc2" dependencies = [ "log", "markup5ever", @@ -2598,9 +2598,9 @@ dependencies = [ [[package]] name = "markup5ever" -version = "0.37.1" +version = "0.38.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7cfb33ea12d5d83b1ba9a55ae7d05faec4f2189d47b79c04d4cea6bbe9f5b083" +checksum = "8983d30f2915feeaaab2d6babdd6bc7e9ed1a00b66b5e6d74df19aa9c0e91862" dependencies = [ "log", "tendril", @@ -3031,7 +3031,7 @@ dependencies = [ [[package]] name = "outlook-pst" version = "1.1.0" -source = "git+https://github.com/rustmailer/outlook-pst-rs.git?branch=main#c12f3595ee5a6f8407d19497133725a3741570aa" +source = "git+https://github.com/rustmailer/outlook-pst-rs.git?branch=main#e0f961daea45068d9431de951f51ffdb8932f2a4" dependencies = [ "byteorder", "thiserror 2.0.17", diff --git a/Cargo.toml b/Cargo.toml index 46392b7..2332a01 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -28,7 +28,7 @@ codegen-units = 1 [dependencies] chrono = "0.4.43" -clap = { version = "4.5.54", features = ["derive", "env"] } +clap = { version = "4.5.56", features = ["derive", "env"] } mimalloc = "0.1.48" native_db = "0.8.2" itertools = "0.14.0" @@ -113,7 +113,7 @@ openssl-sys = { version = "0.9.111", optional = true, features = ["vendored"] } gethostname = "1.1.0" tantivy = { version = "0.25.0", features = ["quickwit", "zstd-compression"] } itoa = "1.0.17" -html2text = "0.16.6" +html2text = "0.16.7" bytes = "1.11.0" dialoguer = "0.12.0" console = "0.16.2" diff --git a/src/bin/bichonctl.rs b/src/bin/bichonctl.rs index 0e0c5ee..727e5ff 100644 --- a/src/bin/bichonctl.rs +++ b/src/bin/bichonctl.rs @@ -1,5 +1,7 @@ use bichon::modules::cli::{ - BichonCli, BichonCtlConfig, auth::verify_user_and_get_account, eml::handle_eml_directory_import, mbox::handle_mbox_single_file_import, pst::handle_pst_import, thunderbird::handle_thunderbird_import + auth::verify_user_and_get_account, eml::handle_eml_directory_import, + mbox::handle_mbox_single_file_import, pst::handle_pst_import, + thunderbird::handle_thunderbird_import, BichonCli, BichonCtlConfig, }; use clap::Parser; use console::style; @@ -72,10 +74,10 @@ async fn main() { let target_account_id = verify_user_and_get_account(&final_config, &theme).await; let import_modes = &[ - "EML: Scan directory recursively (Maintains folder structure)", - "MBOX: Single archive file (Stream from one file)", - "Thunderbird: Import from local profile directory", - "PST: Outlook Personal Storage (Single .pst file)", + "1. EML: Scan directory recursively (Maintains folder structure)", + "2. MBOX: Single archive file (Stream from one file)", + "3. Thunderbird: Import from local profile directory", + "4. PST: Outlook Personal Storage (Single .pst file)", ]; let mode_idx = Select::with_theme(&theme) diff --git a/src/modules/cli/pst/mod.rs b/src/modules/cli/pst/mod.rs index a29bd0a..a44a4ad 100644 --- a/src/modules/cli/pst/mod.rs +++ b/src/modules/cli/pst/mod.rs @@ -342,38 +342,39 @@ fn extract_recipients_list(message: &Rc) -> (Vec, Vec { - if let Some(PropertyValue::Integer32(t)) = prop_val { - r_type = t; + for (col, val) in context.columns().iter().zip(cols) { + let prop_val = val + .as_ref() + .and_then(|v| recipient_table.read_column(v, col.prop_type()).ok()); + match col.prop_id() { + 0x0C15 => { + if let Some(PropertyValue::Integer32(t)) = prop_val { + r_type = t; + } } - } - 0x39FE | 0x3003 => { - if let Some(s) = prop_val.and_then(|v| extract_string(&v)) { - email = s; + 0x39FE | 0x3003 => { + if let Some(s) = prop_val.and_then(|v| extract_string(&v)) { + email = s; + } } + _ => {} } - _ => {} } - } - if !email.is_empty() { - match r_type { - 1 => to.push(email), - 2 => cc.push(email), - 3 => bcc.push(email), - _ => {} + if !email.is_empty() { + match r_type { + 1 => to.push(email), + 2 => cc.push(email), + 3 => bcc.push(email), + _ => {} + } } } }