Skip to content
Snippets Groups Projects
Unverified Commit 97e961d5 authored by Julien Gribonvald's avatar Julien Gribonvald Committed by GitHub
Browse files

fix: health_check SMTP check when no auth required (#2281)

parent 42bb5681
No related branches found
No related tags found
No related merge requests found
......@@ -65,9 +65,13 @@ class HealthCheckController < ApplicationController
smtp.enable_starttls_auto if smtp.respond_to?(:enable_starttls_auto)
end
if settings[:authentication].present? && settings[:authentication] != "none"
smtp.start(settings[:domain]) do |s|
s.authenticate(settings[:user_name], settings[:password], settings[:authentication])
end
else
smtp.start(settings[:domain])
end
rescue => e
raise "Unable to connect to SMTP Server - #{e}"
end
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment