mirror of
https://github.com/pimalaya/himalaya.git
synced 2026-06-16 20:57:53 +08:00
fix wizard
This commit is contained in:
@@ -0,0 +1 @@
|
||||
pub(crate) mod wizard;
|
||||
@@ -0,0 +1,17 @@
|
||||
use anyhow::Result;
|
||||
use dialoguer::Input;
|
||||
use email::sendmail::SendmailConfig;
|
||||
|
||||
use crate::{backend::config::BackendConfig, config::wizard::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))
|
||||
}
|
||||
Reference in New Issue
Block a user