mirror of
https://github.com/chatmail/core.git
synced 2026-05-07 08:56:30 +03:00
Better warning if the pw is wrong
This commit is contained in:
@@ -303,10 +303,8 @@ impl Imap {
|
|||||||
.stock_string_repl_str(StockMessage::CannotLogin, &imap_user)
|
.stock_string_repl_str(StockMessage::CannotLogin, &imap_user)
|
||||||
.await;
|
.await;
|
||||||
|
|
||||||
emit_event!(
|
error!(context, "{}", message);
|
||||||
context,
|
|
||||||
Event::ErrorNetwork(format!("{} ({})", message, err))
|
|
||||||
);
|
|
||||||
self.trigger_reconnect();
|
self.trigger_reconnect();
|
||||||
Err(Error::LoginFailed(format!("cannot login as {}", imap_user)))
|
Err(Error::LoginFailed(format!("cannot login as {}", imap_user)))
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -122,7 +122,7 @@ async fn fetch_idle(ctx: &Context, connection: &mut Imap, folder: Config) -> Int
|
|||||||
Some(watch_folder) => {
|
Some(watch_folder) => {
|
||||||
// connect and fake idle if unable to connect
|
// connect and fake idle if unable to connect
|
||||||
if let Err(err) = connection.connect_configured(&ctx).await {
|
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;
|
return connection.fake_idle(&ctx, None).await;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -130,7 +130,9 @@ pub enum StockMessage {
|
|||||||
))]
|
))]
|
||||||
AcSetupMsgBody = 43,
|
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,
|
CannotLogin = 60,
|
||||||
|
|
||||||
#[strum(props(fallback = "Could not connect to %1$s: %2$s"))]
|
#[strum(props(fallback = "Could not connect to %1$s: %2$s"))]
|
||||||
|
|||||||
Reference in New Issue
Block a user