pimalaya-tui 0.2.2

Collection of crossterm widgets shared accross Pimalaya projects
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use email::sendmail::config::{SendmailConfig, SENDMAIL_DEFAULT_COMMAND};

use crate::{terminal::prompt, Result};

pub fn start() -> Result<SendmailConfig> {
    let cmd = prompt::text(
        "Sendmail-compatible shell command to send emails",
        Some(&SENDMAIL_DEFAULT_COMMAND),
    )?;

    let config = SendmailConfig {
        cmd: Some(cmd.into()),
    };

    Ok(config)
}