Sha256: 76e49f67d679159cb00ac3eeaa14ed36d3add4df762c3f3102a44e925efdba85
Contents?: true
Size: 870 Bytes
Versions: 21
Compression:
Stored size: 870 Bytes
Contents
# frozen_string_literal: true module NeetoCommonsBackend module Initializers class << self def email_setup Premailer::Rails.config.merge!(preserve_styles: true, remove_ids: true) ActionMailer::Base.default_url_options[:host] = Rails.application.secrets.host ActionMailer::Base.delivery_method = Rails.application.config.action_mailer.delivery_method ActionMailer::Base.asset_host = Rails.application.secrets.host if ActionMailer::Base.delivery_method == :smtp ActionMailer::Base.smtp_settings = Rails.application.secrets.mailer[:smtp_settings].symbolize_keys end if Rails.env.production? && ENV["APP_URL"].blank? raise "URLs in email use APP_URL. This is not set. Please fix it by adding APP_URL env in the format app.neetoappname.com" end end end end end
Version data entries
21 entries across 21 versions & 1 rubygems