You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
45 lines
1.4 KiB
45 lines
1.4 KiB
require_relative "boot" |
|
|
|
require "rails/all" |
|
|
|
# Require the gems listed in Gemfile, including any gems |
|
# you've limited to :test, :development, or :production. |
|
Bundler.require(*Rails.groups) |
|
|
|
module CdaoPjet |
|
class Application < Rails::Application |
|
# Initialize configuration defaults for originally generated Rails version. |
|
config.load_defaults 6.1 |
|
|
|
# Configuration for the application, engines, and railties goes here. |
|
# |
|
# These settings can be overridden in specific environments using the files |
|
# in config/environments, which are processed later. |
|
# |
|
# config.time_zone = "Central Time (US & Canada)" |
|
# config.eager_load_paths << Rails.root.join("extras") |
|
|
|
# Mailer |
|
if Rails.env.production? |
|
config.action_mailer.delivery_method = :smtp |
|
config.action_mailer.default_options = { |
|
from: ENV["MAILER_FROM"], |
|
reply_to: ENV["REPLY_TO"], |
|
subject: ENV["MAILER_SUBJECT"], |
|
} |
|
config.action_mailer.smtp_settings = { |
|
address: ENV["MAILER_ADDRESS"], |
|
port: ENV["MAILER_PORT"], |
|
domain: ENV["MAILER_DOMAIN"], |
|
user_name: ENV["MAILER_USERNAME"], |
|
password: ENV["MAILER_PASSWORD"], |
|
authentication: :plain, |
|
enable_starttls_auto: "true", |
|
} |
|
config.action_mailer.default_url_options = { |
|
host: ENV["MAILER_URL_HOST"] || ENV["URL_HOST"], |
|
only_path: !(Figaro.env.mailer_url_host? || Figaro.env.url_host?), |
|
} |
|
end |
|
end |
|
end
|
|
|