mirror of
https://github.com/Growstuff/growstuff.git
synced 2026-05-25 01:13:03 -04:00
Compare commits
5 Commits
release85
...
refactor-h
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6ee86b6b38 | ||
|
|
dc11a1674d | ||
|
|
4085014e06 | ||
|
|
18986ee133 | ||
|
|
f5a4ba60fe |
@@ -1,6 +1,6 @@
|
||||
# frozen_string_literal: true
|
||||
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
default from: 'from@example.com'
|
||||
default from: "Growstuff <#{Rails.configuration.x.email[:from]}>"
|
||||
layout 'mailer'
|
||||
end
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
class NotifierMailer < ApplicationMailer
|
||||
# include NotificationsHelper
|
||||
default from: "Growstuff <#{ENV.fetch('GROWSTUFF_EMAIL', nil)}>"
|
||||
default from: "Growstuff <#{Rails.configuration.x.email[:from]}>"
|
||||
|
||||
def verifier
|
||||
unless ENV['RAILS_SECRET_TOKEN']
|
||||
|
||||
@@ -62,9 +62,9 @@ module Growstuff
|
||||
|
||||
# Growstuff-specific configuration variables
|
||||
config.currency = 'AUD'
|
||||
config.bot_email = ENV.fetch('GROWSTUFF_EMAIL', nil)
|
||||
config.bot_email = Rails.configuration.x.email[:from]
|
||||
config.user_agent = 'Growstuff'
|
||||
config.user_agent_email = "info@growstuff.org"
|
||||
config.user_agent_email = Rails.configuration.x.email[:from]
|
||||
|
||||
Gibbon::API.api_key = ENV['GROWSTUFF_MAILCHIMP_APIKEY'] || 'notarealkey'
|
||||
# API key can't be blank or tests fail
|
||||
|
||||
@@ -6,7 +6,7 @@ Devise.setup do |config|
|
||||
# ==> Mailer Configuration
|
||||
# Configure the e-mail address which will be shown in Devise::Mailer,
|
||||
# note that it will be overwritten if you use your own mailer class with default "from" parameter.
|
||||
config.mailer_sender = "Growstuff <#{ENV.fetch('GROWSTUFF_EMAIL', nil)}>"
|
||||
config.mailer_sender = "Growstuff <#{Rails.configuration.x.email[:from]}>"
|
||||
|
||||
config.secret_key = ENV.fetch('RAILS_SECRET_TOKEN', nil)
|
||||
|
||||
|
||||
9
config/initializers/email.rb
Normal file
9
config/initializers/email.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module Growstuff
|
||||
class Application < Rails::Application
|
||||
config.x.email = {
|
||||
from: ENV.fetch('GROWSTUFF_EMAIL', 'info@growstuff.org'),
|
||||
admin: ENV.fetch('GROWSTUFF_ADMIN_EMAIL', 'sysadmin@growstuff.org'),
|
||||
support: ENV.fetch('GROWSTUFF_SUPPORT_EMAIL', 'info@growstuff.org')
|
||||
}
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user