<commit_before>require 'mail'
require 'action_mailer/tmail_compat'
require 'action_mailer/collector'
require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/proc'

module ActionMailer #:nodoc:
  # Action Mailer allows you to send email from your application using a mailer model and views.
  #
  # = Mailer Models
  #
  # To use Action Mailer, you need to create a mailer model.
  #
  #   $ rails generate mailer Notifier
  #
  # The generated model inherits from <tt>ActionMailer::Base</tt>. Emails are defined by creating methods
  # within the model which are then used to set variables to be used in the mail template, to
  # change options on the mail, or to add attachments.
  #
  # Examples:
  #
  #  class Notifier < ActionMailer::Base
  #    default :from => '<EMAIL>',
  #            :return_path => '<EMAIL>'
  #
  #    def welcome(recipient)
  #      @account = recipient
  #      mail(:to => recipient.email_address_with_name,
  #           :bcc => ["<EMAIL>", "Order Watcher <<EMAIL>>"])
  #      end
  #    end
  #
  # Within the mailer method, you have access to the following methods:
  #
  # * <tt>attachments[]=</tt> - Allows you to add attachments to your email in an intuitive
  #   manner; <tt>attachments['filename.png'] = File.read('path/to/filename.png')</tt>
  #
  # * <tt>attachments.inline[]=</tt> - Allows you to add an inline attachment to your email
  #   in the same manner as <tt>attachments[]=</tt>
  #
  # * <tt>headers[]=</tt> - Allows you to specify any header field in your email such
  #   as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields (like <tt>To:</tt>
  #   <tt>From:</tt> can only appear once in an email header, other fields like <tt>X-Anything</tt>
  #   can appear multiple times. If you want to change a field that can appear multiple times,
  #   you need to set it to nil first so that Mail knows you are replacing it, not adding
  #   another field of the same name.)
  #
  # * <tt>headers(hash)</tt> - Allows you to specify multiple headers in your email such
  #   as <tt>headers({'X-No-Spam' => 'True', 'In-Reply-To' => '<EMAIL>'})</tt>
  #
  # * <tt>mail</tt> - Allows you to specify your email to send.
  #
  # The hash passed to the mail method allows you to specify any header that a Mail::Message
  # will accept (any valid Email header including optional fields).
  #
  # The mail method, if not passed a block, will inspect your views and send all the views with
  # the same name as the method, so the above action would send the +welcome.text.plain.erb+ view
  # file as well as the +welcome.text.html.erb+ view file in a +multipart/alternative+ email.
  #
  # If you want to explicitly render only certain templates, pass a block:
  #
  #   mail(:to => user.emai) do |format|
  #     format.text
  #     format.html
  #   end
  #
  # The block syntax is useful if also need to specify information specific to a part:
  #
  #   mail(:to => user.emai) do |format|
  #     format.text(:content_transfer_encoding => "base64")
  #     format.html
  #   end
  #
  # Or even to render a special view:
  #
  #   mail(:to => user.emai) do |format|
  #     format.text
  #     format.html { render "some_other_template" }
  #   end
  #
  # = Mailer views
  #
  # Like Action Controller, each mailer class has a corresponding view directory in which each
  # method of the class looks for a template with its name.
  #
  # To define a template to be used with a mailing, create an <tt>.erb</tt> file with the same
  # name as the method in your mailer model. For example, in the mailer defined above, the template at<commit_msg>docfix (email instead of emai)<commit_after>require 'mail'
require 'action_mailer/tmail_compat'
require 'action_mailer/collector'
require 'active_support/core_ext/array/wrap'
require 'active_support/core_ext/object/blank'
require 'active_support/core_ext/proc'

module ActionMailer #:nodoc:
  # Action Mailer allows you to send email from your application using a mailer model and views.
  #
  # = Mailer Models
  #
  # To use Action Mailer, you need to create a mailer model.
  #
  #   $ rails generate mailer Notifier
  #
  # The generated model inherits from <tt>ActionMailer::Base</tt>. Emails are defined by creating methods
  # within the model which are then used to set variables to be used in the mail template, to
  # change options on the mail, or to add attachments.
  #
  # Examples:
  #
  #  class Notifier < ActionMailer::Base
  #    default :from => '<EMAIL>',
  #            :return_path => '<EMAIL>'
  #
  #    def welcome(recipient)
  #      @account = recipient
  #      mail(:to => recipient.email_address_with_name,
  #           :bcc => ["<EMAIL>", "Order Watcher <<EMAIL>>"])
  #      end
  #    end
  #
  # Within the mailer method, you have access to the following methods:
  #
  # * <tt>attachments[]=</tt> - Allows you to add attachments to your email in an intuitive
  #   manner; <tt>attachments['filename.png'] = File.read('path/to/filename.png')</tt>
  #
  # * <tt>attachments.inline[]=</tt> - Allows you to add an inline attachment to your email
  #   in the same manner as <tt>attachments[]=</tt>
  #
  # * <tt>headers[]=</tt> - Allows you to specify any header field in your email such
  #   as <tt>headers['X-No-Spam'] = 'True'</tt>. Note, while most fields (like <tt>To:</tt>
  #   <tt>From:</tt> can only appear once in an email header, other fields like <tt>X-Anything</tt>
  #   can appear multiple times. If you want to change a field that can appear multiple times,
  #   you need to set it to nil first so that Mail knows you are replacing it, not adding
  #   another field of the same name.)
  #
  # * <tt>headers(hash)</tt> - Allows you to specify multiple headers in your email such
  #   as <tt>headers({'X-No-Spam' => 'True', 'In-Reply-To' => '<EMAIL>'})</tt>
  #
  # * <tt>mail</tt> - Allows you to specify your email to send.
  #
  # The hash passed to the mail method allows you to specify any header that a Mail::Message
  # will accept (any valid Email header including optional fields).
  #
  # The mail method, if not passed a block, will inspect your views and send all the views with
  # the same name as the method, so the above action would send the +welcome.text.plain.erb+ view
  # file as well as the +welcome.text.html.erb+ view file in a +multipart/alternative+ email.
  #
  # If you want to explicitly render only certain templates, pass a block:
  #
  #   mail(:to => user.email) do |format|
  #     format.text
  #     format.html
  #   end
  #
  # The block syntax is useful if also need to specify information specific to a part:
  #
  #   mail(:to => user.email) do |format|
  #     format.text(:content_transfer_encoding => "base64")
  #     format.html
  #   end
  #
  # Or even to render a special view:
  #
  #   mail(:to => user.email) do |format|
  #     format.text
  #     format.html { render "some_other_template" }
  #   end
  #
  # = Mailer views
  #
  # Like Action Controller, each mailer class has a corresponding view directory in which each
  # method of the class looks for a template with its name.
  #
  # To define a template to be used with a mailing, create an <tt>.erb</tt> file with the same
  # name as the method in your mailer model. For example, in the mailer defined above, the template at
{'fraction_non_alphanumeric': 0.10815217391304348, 'fraction_numerical': 0.0005434782608695652, 'mean_word_length': 3.1611079706048617, 'pattern_counts': {'":': 0, '<': 73, '<?xml version=': 0, '>': 91, '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': '1771740', 'n_tokens_mistral': 2313, 'n_tokens_neox': 2297, 'n_words': 885}