From 5ddffc8c24635fe44cd66f78d7b5e2f7091e34d6 Mon Sep 17 00:00:00 2001 From: Jamis Buck Date: Fri, 1 Jul 2005 13:17:44 +0000 Subject: Allow for nested parts in multipart mails #1570 [Flurin Egger] git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1581 5ecf4fe2-1ee6-0310-87b1-e25e094e27de --- actionmailer/test/mail_service_test.rb | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) (limited to 'actionmailer/test') diff --git a/actionmailer/test/mail_service_test.rb b/actionmailer/test/mail_service_test.rb index f5402c6617..01b71801b8 100755 --- a/actionmailer/test/mail_service_test.rb +++ b/actionmailer/test/mail_service_test.rb @@ -145,6 +145,20 @@ class TestMailer < ActionMailer::Base "line #5\n\nline#6\r\n\r\nline #7" end + def nested_multipart(recipient) + recipients recipient + subject "nested multipart" + from "test@example.com" + content_type "multipart/mixed" + part :content_type => "multipart/alternative", :content_disposition => "inline" do |p| + p.part :content_type => "text/plain", :body => "test text\nline #2" + p.part :content_type => "text/html", :body => "test HTML
\nline #2" + end + attachment :content_type => "application/octet-stream",:filename => "test.txt", :body => "test abcdefghijklmnopqstuvwxyz" + + end + + class <