<commit_before>class VoeisMailer < ActionMailer::Base
    default :from => '<EMAIL>'
  #<EMAIL>
  def email_forge(subject, body)
    puts "Im emailing"
    mail(:to => '<EMAIL>', 
         :subject => subject, 
         :body => body ).deliver
  end
  
  def email(to, subject = 'From Voeis', message = '')
    @message = message
    mail(:to => to,
         :subject => subject)
  end
  
  def email_user(address, subject, body)
     mail(:to => address, 
         :subject => subject, 
         :body => body ).deliver
  end
  
  def email_rescued_exception(e, env)
    @request = ActionDispatch::Request.new(env)
    req = "URL       :#{@request.url}\n"
    req << "IP address: #{@request.remote_ip}\n"
    req << "Parameters: #{@request.filtered_parameters.inspect}\n"
    req << "Rails root: #{Rails.root}\n"
    mail(:to =>%w{ <EMAIL> <EMAIL> <EMAIL>},
         :subject => "Caught Exception Error",
         :body => "\n\nMessage\n__________\n"+e.message+"\n\nRequest\n__________\n"+req+"\n\nBacktrace\n_________\n"+e.backtrace * "\n").deliver
  end
end<commit_msg>added a new email notification function<commit_after>class VoeisMailer < ActionMailer::Base
    default :from => '<EMAIL>'
  #<EMAIL>
  def email_forge(subject, body)
    puts "Im emailing"
    mail(:to => '<EMAIL>', 
         :subject => subject, 
         :body => body ).deliver
  end
  
  def email(to, subject = 'From Voeis', message = '')
    @message = message
    mail(:to => to,
         :subject => subject)
  end
  
  def email_user(address, subject, body)
     mail(:to => address, 
         :subject => subject, 
         :body => body ).deliver
  end
  
  def email_rescued_exception(e, env)
    @request = ActionDispatch::Request.new(env)
    req = "URL       :#{@request.url}\n"
    req << "IP address: #{@request.remote_ip}\n"
    req << "Parameters: #{@request.filtered_parameters.inspect}\n"
    req << "Rails root: #{Rails.root}\n"
    mail(:to =>%w{ <EMAIL> <EMAIL> <EMAIL>},
         :subject => "Caught Exception Error",
         :body => "\n\nMessage\n__________\n"+e.message+"\n\nRequest\n__________\n"+req+"\n\nBacktrace\n_________\n"+e.backtrace * "\n").deliver
  end
  
  def email_facet_exception(e)
    mail(:to =>%w{ <EMAIL> <EMAIL> <EMAIL>},
         :subject => "Caught FACET Exception Error",
         :body => "\n\nMessage\n__________\n"+e.message+"\n\nBacktrace\n_________\n"+e.backtrace * "\n").deliver
  end
end
{'fraction_non_alphanumeric': 0.17265592730276746, 'fraction_numerical': 0.0, 'mean_word_length': 2.9064516129032256, 'pattern_counts': {'":': 0, '<': 32, '<?xml version=': 0, '>': 45, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 3, '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': '1760289', 'n_tokens_mistral': 838, 'n_tokens_neox': 831, 'n_words': 178}