Generalized logs and mailer (#312)

This commit is contained in:
Jesus Federico
2018-10-26 11:59:49 -04:00
committed by GitHub
parent b8785a3bf8
commit 3b67ffee40
5 changed files with 33 additions and 23 deletions

View File

@ -55,19 +55,16 @@ module Greenlight
config.bigbluebutton_secret_default = "8cd8ef52e8e101574e400365b55e11a6"
# Use standalone BigBlueButton server.
config.bigbluebutton_endpoint = ENV["BIGBLUEBUTTON_ENDPOINT"]
config.bigbluebutton_secret = ENV["BIGBLUEBUTTON_SECRET"]
# Fallback to testing credentails.
if config.bigbluebutton_endpoint.blank?
config.bigbluebutton_endpoint = config.bigbluebutton_endpoint_default
config.bigbluebutton_secret = config.bigbluebutton_secret_default
end
config.bigbluebutton_endpoint = ENV["BIGBLUEBUTTON_ENDPOINT"] || config.bigbluebutton_endpoint_default
config.bigbluebutton_secret = ENV["BIGBLUEBUTTON_SECRET"] || config.bigbluebutton_secret_default
# Fix endpoint format if required.
config.bigbluebutton_endpoint += "api/" unless config.bigbluebutton_endpoint.ends_with?('api/')
end
# Specify the email address that all mail is sent from
config.email_sender = ENV['EMAIL_SENDER'].present? ? ENV['EMAIL_SENDER'] : "notifications@example.com"
# Determine if GreenLight should enable email verification
config.enable_email_verification = (ENV['ALLOW_MAIL_NOTIFICATIONS'] == "true")

View File

@ -28,8 +28,8 @@ Rails.application.configure do
config.cache_store = :null_store
end
# Tell Action Mailer to use smtp server
config.action_mailer.delivery_method = :smtp
# Tell Action Mailer to use smtp server, if configured
config.action_mailer.delivery_method = ENV['SMTP_SERVER'].present? ? :smtp : :sendmail
ActionMailer::Base.smtp_settings = {
address: ENV['SMTP_SERVER'],

View File

@ -54,8 +54,8 @@ Rails.application.configure do
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# Tell Action Mailer to use smtp server
config.action_mailer.delivery_method = :smtp
# Tell Action Mailer to use smtp server, if configured
config.action_mailer.delivery_method = ENV['SMTP_SERVER'].present? ? :smtp : :sendmail
ActionMailer::Base.smtp_settings = {
address: ENV['SMTP_SERVER'],