mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-17 05:07:55 +08:00
18 lines
494 B
Rust
18 lines
494 B
Rust
use anyhow::Result;
|
|
use dialoguer::Input;
|
|
use email::sendmail::config::SendmailConfig;
|
|
|
|
use crate::{backend::config::BackendConfig, ui::THEME};
|
|
|
|
pub(crate) fn configure() -> Result<BackendConfig> {
|
|
let mut config = SendmailConfig::default();
|
|
|
|
config.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))
|
|
}
|