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)