context "when using Mailgun without an API key" do
let(:replies_enabled) { true }
let(:mailgun_address) { "smtp.mailgun.org" }
let(:api_key) { nil }
it do
expect(check).to have_a_problem.with_priority("low").with_message(
"The server is configured to send emails via Mailgun but you haven't provided an API key used to verify the webhook messages.",
)
end
如果我们启用了回复,它会抱怨,但在这种情况下,我们不需要 webhook,并且
context "when replies are disabled" do
let(:replies_enabled) { false }
let(:mailgun_address) { anything }
let(:api_key) { anything }
it { expect(check).to be_chill_about_it }
end
我刚刚也遇到了这个问题。如果启用了邮件接收器,这个警告就毫无意义。我根据这里读到的内容(谢谢 Jay!)忽略了这个警告,但总觉得可以处理得更好。至少提供一个指向设置的链接,这样您就不必去寻找它了(剧透:它不在电子邮件设置中),并且在设置中提供一个更好的描述,提供更多细节,也许还有一个指向 meta 上文档主题的链接?