diff --git a/Userland/Applications/Mail/MailWidget.cpp b/Userland/Applications/Mail/MailWidget.cpp index a7557c4c8c..e830a15695 100644 --- a/Userland/Applications/Mail/MailWidget.cpp +++ b/Userland/Applications/Mail/MailWidget.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include #include @@ -118,9 +119,9 @@ bool MailWidget::connect_and_login() } auto password = config->read_entry("User", "Password", {}); - if (password.is_empty()) { - GUI::MessageBox::show_error(window(), "Mail has no password configured. Refer to the Mail(1) man page for more information."); - return false; + while (password.is_empty()) { + if (GUI::InputBox::show(window(), password, String::formatted("Enter password for {}:", username), "Login", {}, GUI::InputType::Password) != GUI::InputBox::ExecOK) + return false; } m_imap_client = make(server, port, tls);