Chris@909: class PluginMail < ActionMailer::Base Chris@909: def mail_from_plugin(note=nil) Chris@909: body(:note => note) Chris@909: end Chris@909: Chris@909: def mail_from_plugin_with_application_template(note=nil) Chris@909: body(:note => note) Chris@909: end Chris@909: Chris@909: def multipart_from_plugin Chris@909: content_type 'multipart/alternative' Chris@909: part :content_type => "text/html", :body => render_message("multipart_from_plugin_html", {}) Chris@909: part "text/plain" do |p| Chris@909: p.body = render_message("multipart_from_plugin_plain", {}) Chris@909: end Chris@909: end Chris@909: Chris@909: def multipart_from_plugin_with_application_template Chris@909: content_type 'multipart/alternative' Chris@909: part :content_type => "text/html", :body => render_message("multipart_from_plugin_with_application_template_html", {}) Chris@909: part "text/plain" do |p| Chris@909: p.body = render_message("multipart_from_plugin_with_application_template_plain", {}) Chris@909: end Chris@909: end Chris@909: Chris@909: end