<commit_before>class BhsiApplicationsMailer < ActionMailer::Base

  default :from    => ApplicationHelper::CIW_BHSI_SUBM_EMAIL
  default :subject => 'BHSI Application Form Submission'

  def send_form(bhsi_application, filename)
    attachments[filename] = File.read(bhsi_application.pdf)
    mail(:to => "#{ApplicationHelper::CIW_JESSICA_EMAIL}, #{ApplicationHelper::CIW_COREY_EMAIL}, #{ApplicationHelper::DAVID_EMAIL}")
  end

  def thank_you_application(bhsi_application)
    mail(:to => bhsi_application.email)
  end

end<commit_msg>Send attachments in bhsi applications<commit_after>class BhsiApplicationsMailer < ActionMailer::Base

  default from:      "<EMAIL>"
  default subject:   'BHSI Application Form Submission'

  def send_form(bhsi)
    @bhsi = bhsi
    attachments[bhsi.pdf_file_name]              = open(bhsi.pdf.url).read
    attachments[bhsi.previous_budget_file_name]  = open(bhsi.previous_budget.url).read
    attachments[bhsi.press_clipping_1_file_name] = open(bhsi.press_clipping_1.url).read if bhsi.press_clipping_1.present?
    attachments[bhsi.press_clipping_2_file_name] = open(bhsi.press_clipping_2.url).read if bhsi.press_clipping_2.present?
    attachments[bhsi.press_clipping_3_file_name] = open(bhsi.press_clipping_3.url).read if bhsi.press_clipping_3.present?

    mail(to: '<EMAIL>')
  end

  def thank_you_application(bhsi)
    mail(to: bhsi.email)
  end

end
{'fraction_non_alphanumeric': 0.1025089605734767, 'fraction_numerical': 0.0064516129032258064, 'mean_word_length': 5.462962962962963, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2351406', 'n_tokens_mistral': 503, 'n_tokens_neox': 490, 'n_words': 72}