X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/d962404672ddd32804ddc7b8f502d01843e36404..e67d7d52092ba61e272a597e2fa9d98aee65c004:/services/api/app/mailers/user_notifier.rb diff --git a/services/api/app/mailers/user_notifier.rb b/services/api/app/mailers/user_notifier.rb index 1f9ad8c8ae..03000a3730 100644 --- a/services/api/app/mailers/user_notifier.rb +++ b/services/api/app/mailers/user_notifier.rb @@ -1,22 +1,19 @@ +# Copyright (C) The Arvados Authors. All rights reserved. +# +# SPDX-License-Identifier: AGPL-3.0 + class UserNotifier < ActionMailer::Base include AbstractController::Callbacks - default from: Rails.configuration.user_notifier_email_from - before_filter :load_variables + default from: Rails.configuration.Users.UserNotifierEmailFrom def account_is_setup(user) @user = user - mail(to: user.email, subject: 'Welcome to Curoverse') - end - -private - def load_variables - if Rails.configuration.respond_to?('workbench_address') and - not Rails.configuration.workbench_address.nil? and - not Rails.configuration.workbench_address.empty? then - @wb_address = Rails.configuration.workbench_address + if not Rails.configuration.Users.UserNotifierEmailBcc.empty? then + @bcc = Rails.configuration.Users.UserNotifierEmailBcc.keys + mail(to: user.email, subject: 'Welcome to Arvados - account enabled', bcc: @bcc) else - @wb_address = '(Unfortunately, config.workbench_address is not set, please contact your site administrator)' + mail(to: user.email, subject: 'Welcome to Arvados - account enabled') end end