IMAP: Allow ENABLE UTF8 in IMAPrev1

This commit is contained in:
mdecimus
2025-08-17 22:30:02 +01:00
parent 2060f287ae
commit b8a86552c4
35 changed files with 150 additions and 160 deletions

View File

@@ -42,21 +42,19 @@ async fn main() -> std::io::Result<()> {
parse_credentials(&credentials)
} else if let Ok(credentials) = std::env::var("CREDENTIALS") {
parse_credentials(&credentials)
} else if args.anonymous {
let credentials = "anonymous:".to_string();
parse_credentials(&credentials)
} else {
if args.anonymous {
let credentials = "anonymous:".to_string();
let credentials = rpassword::prompt_password(
"\nEnter administrator credentials or press [ENTER] to use OAuth: ",
)
.unwrap();
if !credentials.is_empty() {
parse_credentials(&credentials)
} else {
let credentials = rpassword::prompt_password(
"\nEnter administrator credentials or press [ENTER] to use OAuth: ",
)
.unwrap();
if !credentials.is_empty() {
parse_credentials(&credentials)
} else {
oauth(&url).await
}
oauth(&url).await
}
},
timeout: args.timeout,
@@ -178,7 +176,7 @@ async fn oauth(url: &str) -> Credentials {
#[serde(untagged)]
pub enum Response<T> {
Error(ManagementApiError),
Data { data: T }
Data { data: T },
}
#[derive(Deserialize)]
@@ -287,7 +285,7 @@ impl Client {
Response::Error(error) => {
eprintln!("Request failed: {error})");
std::process::exit(1);
},
}
}
}
}