<commit_before>module Refinery
  module Inquiries
    class InquiryMailer < ActionMailer::Base

      def confirmation(inquiry, request)
        @inquiry = inquiry
        mail :subject   => Refinery::Inquiries::Setting.confirmation_subject(Globalize.locale),
             :to        => inquiry.email,
             :from      => ::I18n.t('from_name',
                                    :scope => 'refinery.inquiries.config',
                                    :site_name => Refinery::Core.site_name,
                                    :name => @inquiry.name) + " <#{Refinery::Inquiries.from_<EMAIL>}@#{request.<EMAIL>}>",
             :reply_to  => Refinery::Inquiries::Setting.notification_recipients.split(',').first
      end

      def notification(inquiry, request)
        @inquiry = inquiry
        mail :subject   => Refinery::Inquiries::Setting.notification_subject,
             :to        => Refinery::Inquiries::Setting.notification_recipients,
             :from      => ::I18n.t('from_name',
                                    :scope => 'refinery.inquiries.config',
                                    :site_name => Refinery::Core.site_name,
                                    :name => @inquiry.name) + " <#{Refinery::Inquiries.from_name}@#{request.domain}>",
             :reply_to  => inquiry.email
      end

    end
  end
end<commit_msg>give a place for user to override from-mail address<commit_after>module Refinery
  module Inquiries
    class InquiryMailer < ActionMailer::Base

      def confirmation(inquiry, request)
        @inquiry, @request = inquiry, request
        mail :subject   => Refinery::Inquiries::Setting.confirmation_subject(Globalize.locale),
             :to        => inquiry.email,
             :from      => from_info,
             :reply_to  => Refinery::Inquiries::Setting.notification_recipients.split(',').first
      end

      def notification(inquiry, request)
        @inquiry, @request = inquiry, request
        mail :subject   => Refinery::Inquiries::Setting.notification_subject,
             :to        => Refinery::Inquiries::Setting.notification_recipients,
             :from      => from_info,
             :reply_to  => inquiry.email
      end

      def from_info
        "\"#{from_name}\" <#{from_mail}>"
      end

      def from_name
        :I18n.t('from_name',
                :scope => 'refinery.inquiries.config',
                :site_name => Refinery::Core.site_name,
                :name => @inquiry.name)
      end

      def from_mail
        "#{Refinery::Inquiries.from_name}@#{@request.domain}"
      end
    end
  end
end
{'fraction_non_alphanumeric': 0.11895625479662318, 'fraction_numerical': 0.0023023791250959325, 'mean_word_length': 1.9457627118644067, 'pattern_counts': {'":': 0, '<': 10, '<?xml version=': 0, '>': 33, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 6, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3741596', 'n_tokens_mistral': 752, 'n_tokens_neox': 723, 'n_words': 124}