From 5521402ee7a538482d090f8d7ce9d180a8c7336f Mon Sep 17 00:00:00 2001 From: farhatahmad <35435341+farhatahmad@users.noreply.github.com> Date: Fri, 22 Feb 2019 15:11:01 -0500 Subject: [PATCH] Fixed #365: Added check to config rake file (GRN-66) (#376) * Added check to config rake file * Update configuration.rake --- lib/tasks/configuration.rake | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/lib/tasks/configuration.rake b/lib/tasks/configuration.rake index 058f3702..ac36df0b 100644 --- a/lib/tasks/configuration.rake +++ b/lib/tasks/configuration.rake @@ -29,10 +29,12 @@ namespace :conf do test_request("#{ENV['BIGBLUEBUTTON_ENDPOINT']}api/getMeetings?checksum=#{checksum}") passed - # Tests the checksum on the getMeetings api call - print "Checking SMTP connection" - test_smtp - passed + if ENV['ALLOW_MAIL_NOTIFICATIONS'] == 'true' + # Tests the configuration of the SMTP Server + print "Checking SMTP connection" + test_smtp + passed + end end end @@ -50,7 +52,7 @@ rescue => exc failed("Error connecting to SMTP - #{exc}") end -# takes the full URL including the protocol +# Takes the full URL including the protocol def test_request(url) uri = URI(url) res = Net::HTTP.get(uri)