Extract mailer from name and address to a setting
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
class ApplicationMailer < ActionMailer::Base
|
||||
helper :settings
|
||||
default from: "Consul <no-reply@consul.es>"
|
||||
default from: "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
|
||||
layout 'mailer'
|
||||
end
|
||||
|
||||
@@ -12,7 +12,7 @@ Devise.setup do |config|
|
||||
# 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 = 'noreply@consul.es'
|
||||
config.mailer_sender = "#{Setting['mailer_from_name']} <#{Setting['mailer_from_address']}>"
|
||||
|
||||
# Configure the class responsible to send e-mails.
|
||||
config.mailer = 'DeviseMailer'
|
||||
|
||||
@@ -32,6 +32,8 @@ Setting.create(key: 'feature.facebook_login', value: "true")
|
||||
Setting.create(key: 'feature.google_login', value: "true")
|
||||
Setting.create(key: 'per_page_code', value: "")
|
||||
Setting.create(key: 'comments_body_max_length', value: '1000')
|
||||
Setting.create(key: 'mailer_from_name', value: 'Consul')
|
||||
Setting.create(key: 'mailer_from_address', value: 'noreply@consul.es')
|
||||
|
||||
puts "Creating Geozones"
|
||||
('A'..'Z').each { |i| Geozone.create(name: "District #{i}", external_code: i.ord, census_code: i.ord) }
|
||||
|
||||
@@ -81,3 +81,8 @@ Setting['banner-img.banner-img-three'] = "Banner image 3"
|
||||
# Proposal notifications
|
||||
Setting['proposal_notification_minimum_interval_in_days'] = 3
|
||||
Setting['direct_message_max_per_day'] = 3
|
||||
|
||||
# Email settings
|
||||
Setting['mailer_from_name'] = 'Consul'
|
||||
Setting['mailer_from_address'] = 'noreply@consul.es'
|
||||
|
||||
|
||||
Reference in New Issue
Block a user