<commit_before>module Envconfig
  class Smtp

    include Service

    def self.providers
      [
        Custom,
        Mandrill,
        Postmark,
        Sendgrid,
      ]
    end

    # A custom configuration, for local or self-managed SMTP servers.
    class Custom
      include Provider
      def valid?
        mapping.values.any? { |k| env.key?(k) } #any? instead of #all?
      end
      def mapping
        {
          address: "SMTP_HOST",
          port: "SMTP_PORT",
          user_name: "SMTP_USERNAME",
          password: "<PASSWORD>",
        }
      end
    end

    class Mandrill
      include Provider
      def mapping
        {
          user_name: "MANDRILL_USERNAME",
          password: "<PASSWORD>",
        }
      end
      def static
        {
          address: "smtp.mandrillapp.com",
          port: "25",
        }
      end
    end

    class Postmark
      include Provider
      def mapping<commit_msg>Mandrill port corrected from 25 to 587.<commit_after>module Envconfig
  class Smtp

    include Service

    def self.providers
      [
        Custom,
        Mandrill,
        Postmark,
        Sendgrid,
      ]
    end

    # A custom configuration, for local or self-managed SMTP servers.
    class Custom
      include Provider
      def valid?
        mapping.values.any? { |k| env.key?(k) } #any? instead of #all?
      end
      def mapping
        {
          address: "SMTP_HOST",
          port: "SMTP_PORT",
          user_name: "SMTP_USERNAME",
          password: "<PASSWORD>",
        }
      end
    end

    class Mandrill
      include Provider
      def mapping
        {
          user_name: "MANDRILL_USERNAME",
          password: "<PASSWORD>",
        }
      end
      def static
        {
          address: "smtp.mandrillapp.com",
          port: "587",
        }
      end
    end

    class Postmark
      include Provider
      def mapping
{'fraction_non_alphanumeric': 0.07805133577789418, 'fraction_numerical': 0.005238344683080147, 'mean_word_length': 1.4487179487179487, 'pattern_counts': {'":': 0, '<': 7, '<?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': '7110777', 'n_tokens_mistral': 576, 'n_tokens_neox': 546, 'n_words': 151}