f819bc0f33
* Use installation config in widget * Add configuration for installation in UI * Add config for mailer Co-authored-by: Sojan <sojan@pepalo.com>
17 lines
473 B
Ruby
17 lines
473 B
Ruby
class ApplicationMailer < ActionMailer::Base
|
|
default from: ENV.fetch('MAILER_SENDER_EMAIL', 'accounts@chatwoot.com')
|
|
layout 'mailer'
|
|
append_view_path Rails.root.join('app/views/mailers')
|
|
|
|
# helpers
|
|
helper :frontend_urls
|
|
helper do
|
|
def global_config
|
|
@global_config ||= GlobalConfig.get('INSTALLATION_NAME', 'BRAND_URL')
|
|
end
|
|
end
|
|
|
|
def smtp_config_set_or_development?
|
|
ENV.fetch('SMTP_ADDRESS', nil).present? || Rails.env.development?
|
|
end
|
|
end
|