actionmailer 2.3.10 → 2.3.11
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +1 -0
- data/Rakefile +1 -1
- data/lib/action_mailer/base.rb +33 -0
- data/lib/action_mailer/version.rb +1 -1
- metadata +7 -7
data/CHANGELOG
CHANGED
data/Rakefile
CHANGED
@@ -54,7 +54,7 @@ spec = Gem::Specification.new do |s|
|
|
54
54
|
s.rubyforge_project = "actionmailer"
|
55
55
|
s.homepage = "http://www.rubyonrails.org"
|
56
56
|
|
57
|
-
s.add_dependency('actionpack', '= 2.3.
|
57
|
+
s.add_dependency('actionpack', '= 2.3.11' + PKG_BUILD)
|
58
58
|
|
59
59
|
s.has_rdoc = true
|
60
60
|
s.requirements << 'none'
|
data/lib/action_mailer/base.rb
CHANGED
@@ -195,6 +195,39 @@ module ActionMailer #:nodoc:
|
|
195
195
|
# end
|
196
196
|
# end
|
197
197
|
#
|
198
|
+
# = Multipart Emails with Attachments
|
199
|
+
#
|
200
|
+
# Multipart emails that also have attachments can be created by nesting a "multipart/alternative" part
|
201
|
+
# within an email that has its content type set to "multipart/mixed". This would also need two templates
|
202
|
+
# in place within +app/views/mailer+ called "welcome_email.text.html.erb" and "welcome_email.text.plain.erb"
|
203
|
+
#
|
204
|
+
# class ApplicationMailer < ActionMailer::Base
|
205
|
+
# def signup_notification(recipient)
|
206
|
+
# recipients recipient.email_address_with_name
|
207
|
+
# subject "New account information"
|
208
|
+
# from "system@example.com"
|
209
|
+
# content_type "multipart/mixed"
|
210
|
+
#
|
211
|
+
# part "multipart/alternative" do |alternative|
|
212
|
+
#
|
213
|
+
# alternative.part "text/html" do |html|
|
214
|
+
# html.body = render_message("welcome_email.text.html", :message => "<h1>HTML content</h1>")
|
215
|
+
# end
|
216
|
+
#
|
217
|
+
# alternative.part "text/plain" do |plain|
|
218
|
+
# plain.body = render_message("welcome_email.text.plain", :message => "text content")
|
219
|
+
# end
|
220
|
+
#
|
221
|
+
# end
|
222
|
+
#
|
223
|
+
# attachment :content_type => "image/png",
|
224
|
+
# :body => File.read(File.join(RAILS_ROOT, 'public/images/rails.png'))
|
225
|
+
#
|
226
|
+
# attachment "application/pdf" do |a|
|
227
|
+
# a.body = File.read('/Users/mikel/Code/mail/spec/fixtures/attachments/test.pdf')
|
228
|
+
# end
|
229
|
+
# end
|
230
|
+
# end
|
198
231
|
#
|
199
232
|
# = Configuration options
|
200
233
|
#
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: actionmailer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 21
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 2.3.
|
9
|
+
- 11
|
10
|
+
version: 2.3.11
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- David Heinemeier Hansson
|
@@ -15,7 +15,7 @@ autorequire: action_mailer
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
18
|
+
date: 2011-02-09 00:00:00 +13:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -26,12 +26,12 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - "="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
hash:
|
29
|
+
hash: 21
|
30
30
|
segments:
|
31
31
|
- 2
|
32
32
|
- 3
|
33
|
-
-
|
34
|
-
version: 2.3.
|
33
|
+
- 11
|
34
|
+
version: 2.3.11
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
37
|
description: Makes it trivial to test and deliver emails sent from a single service layer.
|