4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
# File 'app/mailers/veteran_readiness_employment_mailer.rb', line 4
def build(pid, email_addr, routed_to_cmp)
email_addr = '[email protected]' if FeatureFlipper.staging_email?
@submission_date = Time.current.in_time_zone('America/New_York').strftime('%m/%d/%Y')
@pid = pid
cmp = '_cmp' if routed_to_cmp
file_path = Rails.root.join('app', 'mailers', 'views', "veteran_readiness_employment#{cmp}.html.erb")
template = File.read(file_path)
mail(
to: email_addr,
subject: 'VR&E Counseling Request Confirmation',
body: ERB.new(template).result(binding)
)
end
|