discourse/app/services/problem_check/missing_mailgun_api_key.rb

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

14 lines
359 B
Ruby
Raw Permalink Normal View History

# frozen_string_literal: true
class ProblemCheck::MissingMailgunApiKey < ProblemCheck
self.priority = "low"
def call
return no_problem if !SiteSetting.reply_by_email_enabled
return no_problem if ActionMailer::Base.smtp_settings[:address] != "smtp.mailgun.org"
return no_problem if SiteSetting.mailgun_api_key.present?
problem
end
end