diff --git a/init.rb b/init.rb
index <HASH>..<HASH> 100644
--- a/init.rb
+++ b/init.rb
@@ -2,6 +2,8 @@ require 'haml'
 require 'haml/template'
 require 'sass'
 require 'sass/plugin'
+require 'templated_mailer/templated_mailer'
 
 ActionView::Base.register_template_handler('haml', Haml::Template)
+ActionMailer::Base.register_template_extension('haml')
 Sass::Plugin.update_stylesheets
diff --git a/lib/haml/exec.rb b/lib/haml/exec.rb
index <HASH>..<HASH> 100644
--- a/lib/haml/exec.rb
+++ b/lib/haml/exec.rb
@@ -127,16 +127,8 @@ END
           end
 
           File.open(File.join(dir, 'init.rb'), 'w') do |file|
-            file.puts <<END
-require 'rubygems'
-require 'haml'
-require 'haml/template'
-require 'sass'
-require 'sass/plugin'
-
-ActionView::Base.register_template_handler('haml', Haml::Template)
-Sass::Plugin.update_stylesheets
-END
+            file.puts "require 'rubygems'\n" +
+                      File.read(File.join(File.dirname(__FILE__), '..', '..', 'init.rb'))
           end
 
           puts "Haml plugin added to #{original_dir}"
Added Steve Ross' templated_mailer plugin, which allows Haml to be used as a template engine for ActionMailer, as an external.


git-svn-id: svn://hamptoncatlin.com/haml/trunk@<I> <I>b-<I>-<I>-af8c-cdc<I>e<I>b9