mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-16 12:47:55 +08:00
5a0ff83a5e
Since Himalaya is intended to be ran as a CLI in the terminal emulator environment, their user experience could vastly improve with better and more colorful error messages and logging. This change will replace more minimal libraries for error-reporting/han- dling with their more advanced counterparts. Since these crates have tight integrations, this commit will change both in one shot. Also we have don't need env_logger any more. So I also have removed that guy as well. Signed-off-by: Perma Alesheikh <me@prma.dev>
18 lines
502 B
Rust
18 lines
502 B
Rust
use color_eyre::Result;
|
|
use dialoguer::Input;
|
|
use email::sendmail::config::SendmailConfig;
|
|
|
|
use crate::{backend::config::BackendConfig, ui::THEME};
|
|
|
|
pub(crate) fn configure() -> Result<BackendConfig> {
|
|
let config = SendmailConfig {
|
|
cmd: Input::with_theme(&*THEME)
|
|
.with_prompt("Sendmail-compatible shell command to send emails")
|
|
.default(String::from("/usr/bin/msmtp"))
|
|
.interact()?
|
|
.into(),
|
|
};
|
|
|
|
Ok(BackendConfig::Sendmail(config))
|
|
}
|