Skip to content

Commit febbd27

Browse files
committed
remove gmail/live SMTP warning
1 parent 35a79a7 commit febbd27

File tree

3 files changed

+2
-30
lines changed

3 files changed

+2
-30
lines changed

app/models/admin_dashboard_data.rb

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ def self.reset_problem_checks
9494
:ram_check, :google_oauth2_config_check,
9595
:facebook_config_check, :twitter_config_check,
9696
:github_config_check, :s3_config_check, :image_magick_check,
97-
:failing_emails_check, :send_consumer_email_check,
97+
:failing_emails_check,
9898
:subfolder_ends_in_slash_check,
9999
:pop3_polling_configuration, :email_polling_errored_recently
100100

@@ -214,10 +214,6 @@ def failing_emails_check
214214
I18n.t('dashboard.failing_emails_warning', num_failed_jobs: num_failed_jobs) if num_failed_jobs > 0
215215
end
216216

217-
def send_consumer_email_check
218-
I18n.t('dashboard.consumer_email_warning') if Rails.env.production? and ActionMailer::Base.smtp_settings[:address] =~ /gmail\.com|live\.com|yahoo\.com/
219-
end
220-
221217
def subfolder_ends_in_slash_check
222218
I18n.t('dashboard.subfolder_ends_in_slash') if Discourse.base_uri =~ /\/$/
223219
end

config/locales/server.en.yml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -816,8 +816,7 @@ en:
816816
s3_config_warning: 'The server is configured to upload files to s3, but at least one the following setting is not set: s3_access_key_id, s3_secret_access_key or s3_upload_bucket. Go to <a href="/admin/site_settings">the Site Settings</a> and update the settings. <a href="http://meta.discourse.org/t/how-to-set-up-image-uploads-to-s3/7229" target="_blank">See "How to set up image uploads to S3?" to learn more</a>.'
817817
s3_backup_config_warning: 'The server is configured to upload backups to s3, but at least one the following setting is not set: s3_access_key_id, s3_secret_access_key or s3_backup_bucket. Go to <a href="/admin/site_settings">the Site Settings</a> and update the settings. <a href="http://meta.discourse.org/t/how-to-set-up-image-uploads-to-s3/7229" target="_blank">See "How to set up image uploads to S3?" to learn more</a>.'
818818
image_magick_warning: 'The server is configured to create thumbnails of large images, but ImageMagick is not installed. Install ImageMagick using your favorite package manager or <a href="http://www.imagemagick.org/script/binary-releases.php" target="_blank">download the latest release</a>.'
819-
failing_emails_warning: 'There are %{num_failed_jobs} email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. <a href="/sidekiq/retries" target="_blank">See the failed jobs in Sidekiq</a>.'
820-
consumer_email_warning: "Your site is configured to use Gmail (or another consumer email service) to send email. <a href='http://support.google.com/a/bin/answer.py?hl=en&answer=166852' target='_blank'>Gmail limits how many emails you can send</a>. Consider using an email service provider like mandrill.com to ensure email deliverability."
819+
failing_emails_warning: 'There are %{num_failed_jobs} email jobs that failed. Check your app.yml and ensure that the mail server settings are correct. <a href="/sidekiq/retries" target="_blank">See the failed jobs in Sidekiq</a>.'
821820
subfolder_ends_in_slash: "Your subfolder setup is incorrect; the DISCOURSE_RELATIVE_URL_ROOT ends in a slash."
822821
email_polling_errored_recently:
823822
one: "Email polling has generated an error in the past 24 hours. Look at <a href='/logs' target='_blank'>the logs</a> for more details."

spec/models/admin_dashboard_data_spec.rb

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -123,29 +123,6 @@ def my_test_method
123123
end
124124
end
125125

126-
describe 'send_consumer_email_check' do
127-
subject { described_class.new.send_consumer_email_check }
128-
129-
it 'returns nil if gmail.com is not in the smtp_settings address' do
130-
ActionMailer::Base.stubs(:smtp_settings).returns({address: 'mandrillapp.com'})
131-
expect(subject).to be_nil
132-
end
133-
134-
context 'gmail.com is in the smtp_settings address' do
135-
before { ActionMailer::Base.stubs(:smtp_settings).returns({address: 'smtp.gmail.com'}) }
136-
137-
it 'returns nil in development env' do
138-
Rails.stubs(env: ActiveSupport::StringInquirer.new('development'))
139-
expect(subject).to be_nil
140-
end
141-
142-
it 'returns a string when in production env' do
143-
Rails.stubs(env: ActiveSupport::StringInquirer.new('production'))
144-
expect(subject).not_to be_nil
145-
end
146-
end
147-
end
148-
149126
describe 'auth_config_checks' do
150127

151128
shared_examples 'problem detection for login providers' do

0 commit comments

Comments
 (0)