<commit_before>module Hermes
  class MailgunProvider < Provider
    required_credentials :api_key

    def send_message(rails_message)
      domain = extract_custom(rails_message, :mailgun_domain) || self.defaults[:domain]
      message = self.mailgun_message(rails_message)

      if self.deliverer.should_deliver?
        self.client.send_message(domain, message)
      end

      return rails_message
    end
<commit_msg>quick bug fix for blank domain<commit_after>module Hermes
  class MailgunProvider < Provider
    required_credentials :api_key

    def send_message(rails_message)
      domain = extract_custom(rails_message, :mailgun_domain)
      domain = self.defaults[:domain] if domain.blank?
      # Utils.log_and_puts "Extracted domain:#{domain} from custom:#{extract_custom(rails_message, :mailgun_domain).class} default:#{self.defaults[:domain]}"
      message = self.mailgun_message(rails_message)

      if self.deliverer.should_deliver?
        self.client.send_message(domain, message)
      end

      return rails_message
    end

{'fraction_non_alphanumeric': 0.0817490494296578, 'fraction_numerical': 0.0, 'mean_word_length': 4.038277511961723, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, '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': '6070193', 'n_tokens_mistral': 323, 'n_tokens_neox': 305, 'n_words': 61}