1 class AdminNotifier < ActionMailer::Base
2 include AbstractController::Callbacks
4 default from: Rails.configuration.admin_notifier_email_from
5 before_filter :load_variables
9 if not Rails.configuration.new_user_notification_recipients.empty? then
10 @recipients = Rails.configuration.new_user_notification_recipients
11 logger.info "Sending mail to #{@recipients} about new user #{@user.uuid} (#{@user.full_name} <#{@user.email}>)"
13 subject: "#{Rails.configuration.email_subject_prefix}New user notification"
18 def new_inactive_user(user)
20 if not Rails.configuration.new_inactive_user_notification_recipients.empty? then
21 @recipients = Rails.configuration.new_inactive_user_notification_recipients
22 logger.info "Sending mail to #{@recipients} about new user #{@user.uuid} (#{@user.full_name} <#{@user.email}>)"
24 subject: "#{Rails.configuration.email_subject_prefix}New inactive user notification"
31 if Rails.configuration.respond_to?('workbench_address') and
32 not Rails.configuration.workbench_address.nil? and
33 not Rails.configuration.workbench_address.empty? then
34 @wb_address = Rails.configuration.workbench_address.sub(/\/$/,'') + '/users'