<commit_before>class InternalMailer < Devise::Mailer
  after_action :set_delivery_options

  private

  def set_delivery_options
    # Send mail directly to postfix - don't bother sending it
    # through Cuttlefish first.
    mail.delivery_method.settings.merge!(
      address: Rails.configuration.postfix_smtp_host,
      port: Rails.configuration.postfix_smtp_port
    )
  end
end
<commit_msg>We can set the default delivery_method_options once because they won't change<commit_after>class InternalMailer < Devise::Mailer
  # Send mail directly to postfix - don't bother sending it through Cuttlefish first.
  # That way we don't need a special app and all the associate nonsense
  default delivery_method_options: {
    address: Rails.configuration.postfix_smtp_host,
    port: Rails.configuration.postfix_smtp_port
  }
end

{'fraction_non_alphanumeric': 0.05790108564535585, 'fraction_numerical': 0.0, 'mean_word_length': 4.42483660130719, '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': '3196569', 'n_tokens_mistral': 254, 'n_tokens_neox': 237, 'n_words': 72}