diff --git a/app/jobs/scheduled/poll_mailbox.rb b/app/jobs/scheduled/poll_mailbox.rb index 320b9858830..0a9c2e5fee2 100644 --- a/app/jobs/scheduled/poll_mailbox.rb +++ b/app/jobs/scheduled/poll_mailbox.rb @@ -98,9 +98,11 @@ module Jobs end rescue Net::OpenTimeout => e mark_as_errored! + AdminDashboardData.add_problem_message('dashboard.poll_pop3_timeout', SiteSetting.pop3_polling_period_mins.minutes + 5.minutes) Discourse.handle_job_exception(e, error_context(@args, "Connecting to '#{SiteSetting.pop3_polling_host}' for polling emails.")) rescue Net::POPAuthenticationError => e mark_as_errored! + AdminDashboardData.add_problem_message('dashboard.poll_pop3_auth_error', SiteSetting.pop3_polling_period_mins.minutes + 5.minutes) Discourse.handle_job_exception(e, error_context(@args, "Signing in to poll incoming emails.")) end diff --git a/app/models/admin_dashboard_data.rb b/app/models/admin_dashboard_data.rb index aa69d36a05e..b1bec980dd7 100644 --- a/app/models/admin_dashboard_data.rb +++ b/app/models/admin_dashboard_data.rb @@ -83,7 +83,12 @@ class AdminDashboardData def self.reset_problem_checks @problem_syms = [] @problem_blocks = [] - @problem_messages = ['dashboard.bad_favicon_url'] + + @problem_messages = [ + 'dashboard.bad_favicon_url', + 'dashboard.poll_pop3_timeout', + 'dashboard.poll_pop3_auth_error' + ] add_problem_check :rails_env_check, :ruby_version_check, :host_names_check, :gc_checks, :ram_check, :google_oauth2_config_check, diff --git a/config/locales/server.en.yml b/config/locales/server.en.yml index 0c0aaade66c..72a452dc6a5 100644 --- a/config/locales/server.en.yml +++ b/config/locales/server.en.yml @@ -791,6 +791,8 @@ en: one: "Email polling has generated an error in the past 24 hours. Look at the logs for more details." other: "Email polling has generated %{count} errors in the past 24 hours. Look at the logs for more details." bad_favicon_url: "The favicon is failing to load. Check your favicon_url setting in Site Settings." + poll_pop3_timeout: "Connection to the POP3 server is timing out. Incoming email could not be retrieved. Please check your POP3 settings and service provider." + poll_pop3_auth_error: "Connection to the POP3 server is failing with an authentication error. Please check your POP3 settings." site_settings: censored_words: "Words that will be automatically replaced with ■■■■"