Merge branch '17948-test-collection-tool' into main. Closes #17948
[arvados.git] / services / api / app / mailers / user_notifier.rb
1 # Copyright (C) The Arvados Authors. All rights reserved.
2 #
3 # SPDX-License-Identifier: AGPL-3.0
4
5 class UserNotifier < ActionMailer::Base
6   include AbstractController::Callbacks
7
8   default from: Rails.configuration.Users.UserNotifierEmailFrom
9
10   def account_is_setup(user)
11     @user = user
12     if not Rails.configuration.Users.UserNotifierEmailBcc.empty? then
13       @bcc = Rails.configuration.Users.UserNotifierEmailBcc.keys
14       mail(to: user.email, subject: 'Welcome to Arvados - account enabled', bcc: @bcc)
15     else
16       mail(to: user.email, subject: 'Welcome to Arvados - account enabled')
17     end
18   end
19
20 end