<commit_before>module Georgia
  class Notifier < ActionMailer::Base

    include SendGrid

    def notify_support(message)
      @message = message
      mail(
        from: "#{@message.name} <#{@message.email}>",
        to: '<EMAIL>',
        cc: @message.email,
        subject: @message.subject)
    end

    def notify_admins(message, url)
      return if Rails.env.development?
      @message = message
      @url = url
      domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
      emails_to = Georgia::User.admins.map(&:email)
      unless emails_to.empty?
        mail(
          from: "do-not-reply@#{domain_name}",
          to: emails_to,
          subject: @message
          )
      end
    end

    def notify_editors(message, url)
      return if Rails.env.development?
      @message = message
      @url = url
      domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
      emails_to = Georgia::User.editors.map(&:email)
      unless emails_to.empty?
        mail(<commit_msg>Do not test mailers for now<commit_after>module Georgia
  class Notifier < ActionMailer::Base

    include SendGrid

    def notify_support(message)
      @message = message
      mail(
        from: "#{@message.name} <#{@message.email}>",
        to: '<EMAIL>',
        cc: @message.email,
        subject: @message.subject)
    end

    def notify_admins(message, url)
      return if Rails.env.development? or Rails.env.test?
      @message = message
      @url = url
      domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
      emails_to = Georgia::User.admins.map(&:email)
      unless emails_to.empty?
        mail(
          from: "do-not-reply@#{domain_name}",
          to: emails_to,
          subject: @message
          )
      end
    end

    def notify_editors(message, url)
      return if Rails.env.development? or Rails.env.test?
      @message = message
      @url = url
      domain_name = Rails.application.config.action_mailer.smtp_settings[:domain]
      emails_to = Georgia::User.editors.map(&:email)
      unless emails_to.empty?
        mail(
{'fraction_non_alphanumeric': 0.11131898971000935, 'fraction_numerical': 0.0, 'mean_word_length': 2.416932907348243, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 7, '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': '2206630', 'n_tokens_mistral': 671, 'n_tokens_neox': 649, 'n_words': 136}