Sha256: 443052109eca03b24c4769cc720f5892f253029cf15cdb857a9a655556a6e67e
Contents?: true
Size: 1011 Bytes
Versions: 10
Compression:
Stored size: 1011 Bytes
Contents
Rails.application.config.action_mailer.raise_delivery_errors = false Rails.application.config.action_mailer.delivery_method = :<%= get(:mailer_delivery_method) %> Rails.application.config.action_mailer.default_url_options = { host: ENV.fetch('APPLICATION_HOST'), protocol: 'https' } Rails.application.config.action_mailer.default_options = { from: ENV['DEFAULT_EMAIL_ADDRESS'] } ASSET_HOST = ENV.fetch("ASSET_HOST", ENV.fetch("APPLICATION_HOST")) Rails.application.config.action_mailer.asset_host = ASSET_HOST if ENV["EMAIL_RECIPIENTS"].present? Mail.register_interceptor RecipientInterceptor.new( ENV["EMAIL_RECIPIENTS"], subject_prefix: "[<%= get(:heroku) ? '#{Heroku.stage.upcase}' : '#{Rails.env}' %>]" ) end <% if get(:mailer_delivery_method) == :aws_sdk -%> creds = Aws::Credentials.new( ENV['AWS_ACCESS_KEY_ID'], ENV['AWS_SECRET_ACCESS_KEY'] ) Aws::Rails.add_action_mailer_delivery_method( :aws_sdk, credentials: creds, region: ENV.fetch('AWS_REGION', 'us-east-1') ) <% end -%>
Version data entries
10 entries across 10 versions & 1 rubygems