Changeset 3956
- Timestamp:
- 03/18/06 23:06:25 (3 years ago)
- Files:
-
- trunk/actionmailer/CHANGELOG (modified) (1 diff)
- trunk/actionmailer/lib/action_mailer/part.rb (modified) (1 diff)
- trunk/actionmailer/test/mail_service_test.rb (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionmailer/CHANGELOG
r3495 r3956 1 1 *SVN* 2 3 * Make custom headers work in subparts #4034 [elan@bluemandrill.com] 2 4 3 5 * Template paths with dot chars in them no longer mess up implicit template selection for multipart messages #3332 [Chad Fowler] trunk/actionmailer/lib/action_mailer/part.rb
r2648 r3956 97 97 part.set_content_type(content_type, nil, { "charset" => charset }) if content_type =~ /multipart/ 98 98 end 99 99 100 @headers.each { |k,v| part[k] = v } 101 100 102 part 101 103 end trunk/actionmailer/test/mail_service_test.rb
r3652 r3956 219 219 attachment :content_type => "application/octet-stream",:filename => "test.txt", :body => "test abcdefghijklmnopqstuvwxyz" 220 220 end 221 222 def attachment_with_custom_header(recipient) 223 recipients recipient 224 subject "custom header in attachment" 225 from "test@example.com" 226 content_type "multipart/related" 227 part :content_type => "text/html", :body => 'yo' 228 attachment :content_type => "image/jpeg",:filename => "test.jpeg", :body => "i am not a real picture", :headers => { 'Content-ID' => '<test@test.com>' } 229 end 221 230 222 231 def unnamed_attachment(recipient) … … 283 292 assert_equal "text/html", created.parts.first.parts[1].content_type 284 293 assert_equal "application/octet-stream", created.parts[1].content_type 294 end 295 296 def test_attachment_with_custom_header 297 created = nil 298 assert_nothing_raised { created = TestMailer.create_attachment_with_custom_header(@recipient)} 299 assert_equal "<test@test.com>", created.parts[1].header['content-id'].to_s 285 300 end 286 301