Better warning if the pw is wrong

This commit is contained in:
Hocuri
2020-06-13 13:33:58 +02:00
parent e2c532704a
commit 06a4f15995
3 changed files with 6 additions and 6 deletions

View File

@@ -303,10 +303,8 @@ impl Imap {
.stock_string_repl_str(StockMessage::CannotLogin, &imap_user)
.await;
emit_event!(
context,
Event::ErrorNetwork(format!("{} ({})", message, err))
);
error!(context, "{}", message);
self.trigger_reconnect();
Err(Error::LoginFailed(format!("cannot login as {}", imap_user)))
}

View File

@@ -122,7 +122,7 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder: Config) -> Int
Some(watch_folder) => {
// connect and fake idle if unable to connect
if let Err(err) = connection.connect_configured(&ctx).await {
error!(ctx, "imap connection failed: {}", err);
warn!(ctx, "imap connection failed: {}", err);
return connection.fake_idle(&ctx, None).await;
}

View File

@@ -130,7 +130,9 @@ pub enum StockMessage {
))]
AcSetupMsgBody = 43,
#[strum(props(fallback = "Cannot login as %1$s."))]
#[strum(props(
fallback = "Cannot login as \"%1$s\". Please check if the email address and the password are correct."
))]
CannotLogin = 60,
#[strum(props(fallback = "Could not connect to %1$s: %2$s"))]