<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -272,18 +272,6 @@ module ActionMailer #:nodoc:
 
     cattr_accessor :logger
 
-    class &lt;&lt; self
-      delegate :settings, :settings=, :to =&gt; ActionMailer::DeliveryMethod::File, :prefix =&gt; :file
-      delegate :settings, :settings=, :to =&gt; ActionMailer::DeliveryMethod::Sendmail, :prefix =&gt; :sendmail
-      delegate :settings, :settings=, :to =&gt; ActionMailer::DeliveryMethod::Smtp, :prefix =&gt; :smtp
-
-      def delivery_method=(method_name)
-        @delivery_method = ActionMailer::DeliveryMethod.lookup_method(method_name)
-      end
-    end
-    self.delivery_method = :smtp
-    superclass_delegating_reader :delivery_method
-
     @@raise_delivery_errors = true
     cattr_accessor :raise_delivery_errors
 
@@ -305,8 +293,8 @@ module ActionMailer #:nodoc:
     @@default_implicit_parts_order = [ &quot;text/html&quot;, &quot;text/enriched&quot;, &quot;text/plain&quot; ]
     cattr_accessor :default_implicit_parts_order
 
-    cattr_reader :protected_instance_variables
     @@protected_instance_variables = []
+    cattr_reader :protected_instance_variables
 
     # Specify the BCC addresses for the message
     adv_attr_accessor :bcc
@@ -380,10 +368,18 @@ module ActionMailer #:nodoc:
     class &lt;&lt; self
       attr_writer :mailer_name
 
+      delegate :settings, :settings=, :to =&gt; ActionMailer::DeliveryMethod::File, :prefix =&gt; :file
+      delegate :settings, :settings=, :to =&gt; ActionMailer::DeliveryMethod::Sendmail, :prefix =&gt; :sendmail
+      delegate :settings, :settings=, :to =&gt; ActionMailer::DeliveryMethod::Smtp, :prefix =&gt; :smtp
+
       def mailer_name
         @mailer_name ||= name.underscore
       end
 
+      def delivery_method=(method_name)
+        @delivery_method = ActionMailer::DeliveryMethod.lookup_method(method_name)
+      end
+
       def respond_to?(method_symbol, include_private = false) #:nodoc:
         matches_dynamic_method?(method_symbol) || super
       end
@@ -445,6 +441,11 @@ module ActionMailer #:nodoc:
         end
     end
 
+    # Configure delivery method. Check ActionMailer::DeliveryMethod for more
+    # instructions.
+    superclass_delegating_reader :delivery_method
+    self.delivery_method = :smtp
+
     # Instantiate a new mailer object. If +method_name+ is not +nil+, the mailer
     # will be initialized according to the named method. If not, the mailer will
     # remain uninitialized (useful when you only need to invoke the &quot;receive&quot;
@@ -498,15 +499,17 @@ module ActionMailer #:nodoc:
       # mailer. Subclasses may override this method to provide different
       # defaults.
       def initialize_defaults(method_name)
-        @charset ||= @@default_charset.dup
-        @content_type ||= @@default_content_type.dup
+        @charset              ||= @@default_charset.dup
+        @content_type         ||= @@default_content_type.dup
         @implicit_parts_order ||= @@default_implicit_parts_order.dup
-        @template ||= method_name
-        @default_template_name = @action_name = @template
-        @mailer_name ||= self.class.name.underscore
-        @parts ||= []
+        @mime_version         ||= @@default_mime_version.dup if @@default_mime_version
+
+        @mailer_name ||= self.class.mailer_name
+        @template    ||= method_name
+        @action_name = @template
+
+        @parts   ||= []
         @headers ||= {}
-        @mime_version = @@default_mime_version.dup if @@default_mime_version
         @sent_on ||= Time.now
 
         super # Run deprecation hooks</diff>
      <filename>actionmailer/lib/action_mailer/base.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>e9667ad1f0e74694d9df16fa2819a1679ee21e23</id>
    </parent>
  </parents>
  <author>
    <name>Jos&#233; Valim</name>
    <email>jose.valim@gmail.com</email>
  </author>
  <url>http://github.com/feldpost/rails/commit/81c416b72e44a75ea74ba342cd223a33f3b80caf</url>
  <id>81c416b72e44a75ea74ba342cd223a33f3b80caf</id>
  <committed-date>2009-10-31T18:23:49-07:00</committed-date>
  <authored-date>2009-10-28T04:08:55-07:00</authored-date>
  <message>More refactoring on ActionMailer::Base.</message>
  <tree>b5fc72bd9d14c35c31bd4009e303d25dffc722c4</tree>
  <committer>
    <name>Yehuda Katz</name>
    <email>wycats@gmail.com</email>
  </committer>
</commit>
