Add configuration for mail delivery
This commit is contained in:
parent
6640be1e9a
commit
8c1acb9cc7
|
|
@ -40,5 +40,11 @@ module TurniereBackend
|
|||
resource '*', headers: :any, methods: :any, expose: ['access-token', 'client', 'expiry', 'uid']
|
||||
end
|
||||
end
|
||||
|
||||
# Mail
|
||||
config.action_mailer.default_url_options = { host: 'turnie.re' }
|
||||
config.action_mailer.default_options = {
|
||||
from: 'noreply@turnie.re'
|
||||
}
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -54,7 +54,10 @@ Rails.application.configure do
|
|||
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
|
||||
|
||||
# Mail
|
||||
config.action_mailer.default_url_options = { host: 'localhost' }
|
||||
config.action_mailer.default_url_options = { host: 'localhost:3000' }
|
||||
config.action_mailer.delivery_method = :smtp
|
||||
config.action_mailer.smtp_settings = { address: 'localhost', port: 1025 }
|
||||
config.action_mailer.smtp_settings = {
|
||||
address: 'localhost',
|
||||
port: 1025
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -53,10 +53,6 @@ Rails.application.configure do
|
|||
|
||||
config.action_mailer.perform_caching = false
|
||||
|
||||
# Ignore bad email addresses and do not raise email delivery errors.
|
||||
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
|
||||
# config.action_mailer.raise_delivery_errors = false
|
||||
|
||||
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
||||
# the I18n.default_locale when a translation cannot be found).
|
||||
config.i18n.fallbacks = true
|
||||
|
|
@ -79,4 +75,13 @@ Rails.application.configure do
|
|||
|
||||
# Do not dump schema after migrations.
|
||||
config.active_record.dump_schema_after_migration = false
|
||||
|
||||
# Mail
|
||||
config.action_mailer.raise_delivery_errors = true
|
||||
config.action_mailer.default_url_options = { host: 'api01.turnie.re' }
|
||||
config.action_mailer.delivery_method = :mailgun
|
||||
config.action_mailer.mailgun_settings = {
|
||||
api_key: Rails.application.credentials.dig(:mailgun, :api_key),
|
||||
domain: Rails.application.credentials.dig(:mailgun, :domain)
|
||||
}
|
||||
end
|
||||
|
|
|
|||
|
|
@ -47,4 +47,6 @@ DeviseTokenAuth.setup do |config|
|
|||
# If, however, you wish to integrate with legacy Devise authentication, you can
|
||||
# do so by enabling this flag. NOTE: This feature is highly experimental!
|
||||
# config.enable_standard_devise_support = false
|
||||
|
||||
config.default_confirm_success_url = 'https://frontend01.turnie.re'
|
||||
end
|
||||
|
|
|
|||
Loading…
Reference in New Issue