diff --git a/src/imap/mod.rs b/src/imap/mod.rs index 493e8bd0c..59970e4fd 100644 --- a/src/imap/mod.rs +++ b/src/imap/mod.rs @@ -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))) } diff --git a/src/scheduler.rs b/src/scheduler.rs index 30aa731e6..121c383ee 100644 --- a/src/scheduler.rs +++ b/src/scheduler.rs @@ -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; } diff --git a/src/stock.rs b/src/stock.rs index 9754b1d3a..84ef72f09 100644 --- a/src/stock.rs +++ b/src/stock.rs @@ -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"))]