From 9ad3bca2ea475b709c8311ab25194e4578c1a0d9 Mon Sep 17 00:00:00 2001 From: Star Rauchenberger Date: Thu, 12 Oct 2023 21:51:02 -0400 Subject: Webmaster gets an email when a comment is posted --- config/deploy.rb | 2 +- config/environments/development.rb | 1 + config/environments/production.rb | 4 +++- config/mail.yml | 8 ++++++++ 4 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 config/mail.yml (limited to 'config') diff --git a/config/deploy.rb b/config/deploy.rb index cbac23c..05b137d 100644 --- a/config/deploy.rb +++ b/config/deploy.rb @@ -21,7 +21,7 @@ set :deploy_to, "/srv/www/thoughts" # set :pty, true # Default value for :linked_files is [] -append :linked_files, "config/database.yml", "config/secrets.yml", "config/lingo.yml", "config/akismet.yml" +append :linked_files, "config/database.yml", "config/secrets.yml", "config/lingo.yml", "config/akismet.yml", "config/mail.yml" # Default value for linked_dirs is [] append :linked_dirs, "log", "tmp/pids", "tmp/cache", "tmp/sockets", "public/uploads" diff --git a/config/environments/development.rb b/config/environments/development.rb index 8500f45..e683ebb 100644 --- a/config/environments/development.rb +++ b/config/environments/development.rb @@ -37,6 +37,7 @@ Rails.application.configure do config.active_storage.service = :local # Don't care if the mailer can't send. + config.action_mailer.default_url_options = { host: 'localhost:3000' } config.action_mailer.raise_delivery_errors = false config.action_mailer.perform_caching = false diff --git a/config/environments/production.rb b/config/environments/production.rb index 182b74e..e814a66 100644 --- a/config/environments/production.rb +++ b/config/environments/production.rb @@ -66,7 +66,9 @@ Rails.application.configure do # Set this to true and configure the email server for immediate delivery to raise delivery errors. # config.action_mailer.raise_delivery_errors = false - config.action_mailer.default_url_options = { host: 'feffernoo.se' } + config.action_mailer.default_url_options = { host: 'www.fourisland.com' } + config.action_mailer.delivery_method = :smtp + config.action_mailer.smtp_settings = Rails.application.config_for(:mail)[:smtp_settings] # Enable locale fallbacks for I18n (makes lookups for any locale fall back to # the I18n.default_locale when a translation cannot be found). diff --git a/config/mail.yml b/config/mail.yml new file mode 100644 index 0000000..3c88234 --- /dev/null +++ b/config/mail.yml @@ -0,0 +1,8 @@ +production: + smtp_settings: + address: "" + port: 25 + user_name: "" + password: "" + authentication: "" + openssl_verify_mode: "" -- cgit 1.4.1