<commit_before>module Inquiry
  class InquiryMailer < ApplicationMailer

    def notification_email_requester(user_email, user_full_name, inquiry_step)
      return unless user_email
      @user_email = user_email
      @user_full_name  = user_full_name
      @inquiry_step = inquiry_step
      mail(to: @user_email, subject: "Converged Cloud: Your inquiry was #{@inquiry_step.inquiry.aasm.human_state}")
    end

    def notification_email_processors(processor_emails, inquiry_step)
      return if processor_emails.blank?
      @inquiry_step = inquiry_step
      mail(to: processor_emails, subject: "Converged Cloud: Please process an SAP Converged Cloud inquiry")
    end

  end
end
<commit_msg>Catch mailer exceptions<commit_after>module Inquiry
  class InquiryMailer < ApplicationMailer

    def notification_email_requester(user_email, user_full_name, inquiry_step)
      return unless user_email
      @user_email = user_email
      @user_full_name = user_full_name
      @inquiry_step = inquiry_step
      begin
        mail(to: @user_email, subject: "Converged Cloud: Your inquiry was #{@inquiry_step.inquiry.aasm.human_state}")
      rescue => e
        Rails.logger.error "InquiryMailer: Could not send email to requester #{@user_email}. Exception: #{e.message}"
      end
    end

    def notification_email_processors(processor_emails, inquiry_step)
      return if processor_emails.blank?
      @inquiry_step = inquiry_step
      begin
        mail(to: processor_emails, subject: "Converged Cloud: Please process an SAP Converged Cloud inquiry")
      rescue => e
        Rails.logger.error "InquiryMailer: Could not send email to processors #{processor_emails}. Exception: #{e.message}"
      end
    end

  end
end

{'fraction_non_alphanumeric': 0.07105719237435008, 'fraction_numerical': 0.0, 'mean_word_length': 3.7845303867403315, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '6609559', 'n_tokens_mistral': 534, 'n_tokens_neox': 516, 'n_words': 134}