* email alert
This commit is contained in:
parent
4ef76abcf9
commit
7ca4de12d7
|
|
@ -20,6 +20,14 @@ module JamRuby
|
|||
subject: options[:subject])
|
||||
end
|
||||
|
||||
def crash_alert(options)
|
||||
mail(to: APP_CONFIG.email_crashes_alias,
|
||||
from: APP_CONFIG.email_generic_from,
|
||||
body: options[:body],
|
||||
content_type: "text/plain",
|
||||
subject: options[:subject])
|
||||
end
|
||||
|
||||
def social(options)
|
||||
mail(to: APP_CONFIG.email_social_alias,
|
||||
from: APP_CONFIG.email_generic_from,
|
||||
|
|
|
|||
|
|
@ -15,6 +15,10 @@ def app_config
|
|||
'alerts@jamkazam.com'
|
||||
end
|
||||
|
||||
def email_crashes_alias
|
||||
'clientcrash@jamkazam.com'
|
||||
end
|
||||
|
||||
def email_recurly_notice
|
||||
'recurly-alerts@jamkazam.com'
|
||||
end
|
||||
|
|
|
|||
|
|
@ -626,6 +626,12 @@ ApiUsersController < ApiController
|
|||
|
||||
logger.debug("crash_dump can read from url #{read_url}")
|
||||
|
||||
body = "Client crash for user #{current_user.email} (#{current_user.name})\n"
|
||||
body << "Client type: #{@dump.client_type}"
|
||||
body << "Client version: #{@dump.client_version}"
|
||||
body << "Download at: #{read_url}\n"
|
||||
body << "User admin url: #{current_user.admin_url}"
|
||||
AdminMailer.crash_alert(subject: "Crash for #{@dump.client_type} #{current_user.email} (#{current_user.name})", body:body)
|
||||
redirect_to write_url, status: 307
|
||||
else
|
||||
# we should store it here to aid in development, but we don't have to until someone wants the feature
|
||||
|
|
|
|||
|
|
@ -240,6 +240,7 @@ if defined?(Bundler)
|
|||
config.num_packaging_nodes = 2
|
||||
|
||||
config.email_social_alias = 'social@jamkazam.com'
|
||||
config.email_crashes_alias = 'clientcrash@jamkazam.com'
|
||||
config.email_alerts_alias = 'alerts@jamkazam.com' # should be used for 'oh no' server down/service down sorts of emails
|
||||
config.email_generic_from = 'nobody@jamkazam.com'
|
||||
config.email_recurly_notice = 'recurly-alerts@jamkazam.com'
|
||||
|
|
|
|||
|
|
@ -95,6 +95,7 @@ SampleApp::Application.configure do
|
|||
config.video_available= ENV['VIDEO_AVAILABILITY'] || "full"
|
||||
config.email_generic_from = 'nobody-dev@jamkazam.com'
|
||||
config.email_alerts_alias = ENV['ALERT_EMAIL'] || 'alerts-dev@jamkazam.com'
|
||||
config.email_crashes_alias = ENV['ALERT_EMAIL'] || 'clientcrash@jamkazam.com'
|
||||
config.email_social_alias = ENV['ALERT_EMAIL'] || 'social-dev@jamkazam.com'
|
||||
config.guard_against_fraud = true
|
||||
config.guard_against_browser_fraud = false
|
||||
|
|
|
|||
Loading…
Reference in New Issue