actionmailer-2.3.17-rack-upgrade 2.3.17
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +387 -0
- data/MIT-LICENSE +21 -0
- data/README +149 -0
- data/Rakefile +97 -0
- data/install.rb +30 -0
- data/lib/action_mailer.rb +62 -0
- data/lib/action_mailer/adv_attr_accessor.rb +30 -0
- data/lib/action_mailer/base.rb +739 -0
- data/lib/action_mailer/helpers.rb +113 -0
- data/lib/action_mailer/mail_helper.rb +17 -0
- data/lib/action_mailer/part.rb +107 -0
- data/lib/action_mailer/part_container.rb +55 -0
- data/lib/action_mailer/quoting.rb +62 -0
- data/lib/action_mailer/test_case.rb +64 -0
- data/lib/action_mailer/test_helper.rb +68 -0
- data/lib/action_mailer/utils.rb +7 -0
- data/lib/action_mailer/vendor/text-format-0.6.3/text/format.rb +1466 -0
- data/lib/action_mailer/vendor/text_format.rb +10 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail.rb +6 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/Makefile +18 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/address.rb +392 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/attachments.rb +65 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/base64.rb +46 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/compat.rb +41 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/config.rb +67 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/core_extensions.rb +63 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/encode.rb +590 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/header.rb +962 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/index.rb +9 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/interface.rb +1162 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/loader.rb +3 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mail.rb +578 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mailbox.rb +496 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/main.rb +6 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/mbox.rb +3 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/net.rb +250 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/obsolete.rb +132 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.rb +1060 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/parser.y +416 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/port.rb +379 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/quoting.rb +164 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/require_arch.rb +58 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner.rb +49 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/scanner_r.rb +262 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/stringio.rb +280 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/utils.rb +362 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/COPYING +504 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/README +12 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet.rb +67 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5freq.rb +927 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/big5prober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/chardistribution.rb +238 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetgroupprober.rb +112 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/charsetprober.rb +75 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/codingstatemachine.rb +64 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/constants.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escprober.rb +89 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/escsm.rb +244 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/eucjpprober.rb +88 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrfreq.rb +596 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euckrprober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwfreq.rb +430 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/euctwprober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312freq.rb +474 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/gb2312prober.rb +42 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/hebrewprober.rb +289 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jisfreq.rb +570 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/jpcntx.rb +229 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langbulgarianmodel.rb +229 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langcyrillicmodel.rb +330 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langgreekmodel.rb +227 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhebrewmodel.rb +202 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langhungarianmodel.rb +226 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/langthaimodel.rb +201 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/latin1prober.rb +147 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcharsetprober.rb +89 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcsgroupprober.rb +45 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/mbcssm.rb +542 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcharsetprober.rb +124 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sbcsgroupprober.rb +56 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/sjisprober.rb +88 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/universaldetector.rb +168 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/vendor/rchardet-1.3/lib/rchardet/utf8prober.rb +87 -0
- data/lib/action_mailer/vendor/tmail-1.2.7/tmail/version.rb +39 -0
- data/lib/action_mailer/vendor/tmail.rb +17 -0
- data/lib/action_mailer/version.rb +9 -0
- data/lib/actionmailer.rb +2 -0
- data/test/abstract_unit.rb +62 -0
- data/test/asset_host_test.rb +54 -0
- data/test/delivery_method_test.rb +51 -0
- data/test/fixtures/asset_host_mailer/email_with_asset.html.erb +1 -0
- data/test/fixtures/auto_layout_mailer/hello.html.erb +1 -0
- data/test/fixtures/auto_layout_mailer/multipart.text.html.erb +1 -0
- data/test/fixtures/auto_layout_mailer/multipart.text.plain.erb +1 -0
- data/test/fixtures/explicit_layout_mailer/logout.html.erb +1 -0
- data/test/fixtures/explicit_layout_mailer/signup.html.erb +1 -0
- data/test/fixtures/first_mailer/share.erb +1 -0
- data/test/fixtures/helper_mailer/use_example_helper.erb +1 -0
- data/test/fixtures/helper_mailer/use_helper.erb +1 -0
- data/test/fixtures/helper_mailer/use_helper_method.erb +1 -0
- data/test/fixtures/helper_mailer/use_mail_helper.erb +5 -0
- data/test/fixtures/helpers/example_helper.rb +5 -0
- data/test/fixtures/layouts/auto_layout_mailer.html.erb +1 -0
- data/test/fixtures/layouts/auto_layout_mailer.text.erb +1 -0
- data/test/fixtures/layouts/spam.html.erb +1 -0
- data/test/fixtures/path.with.dots/funky_path_mailer/multipart_with_template_path_with_dots.erb +1 -0
- data/test/fixtures/raw_email +14 -0
- data/test/fixtures/raw_email10 +20 -0
- data/test/fixtures/raw_email12 +32 -0
- data/test/fixtures/raw_email13 +29 -0
- data/test/fixtures/raw_email2 +114 -0
- data/test/fixtures/raw_email3 +70 -0
- data/test/fixtures/raw_email4 +59 -0
- data/test/fixtures/raw_email5 +19 -0
- data/test/fixtures/raw_email6 +20 -0
- data/test/fixtures/raw_email7 +66 -0
- data/test/fixtures/raw_email8 +47 -0
- data/test/fixtures/raw_email9 +28 -0
- data/test/fixtures/raw_email_quoted_with_0d0a +14 -0
- data/test/fixtures/raw_email_with_invalid_characters_in_content_type +104 -0
- data/test/fixtures/raw_email_with_nested_attachment +100 -0
- data/test/fixtures/raw_email_with_partially_quoted_subject +14 -0
- data/test/fixtures/second_mailer/share.erb +1 -0
- data/test/fixtures/templates/signed_up.erb +3 -0
- data/test/fixtures/test_mailer/_subtemplate.text.plain.erb +1 -0
- data/test/fixtures/test_mailer/body_ivar.erb +2 -0
- data/test/fixtures/test_mailer/custom_templating_extension.text.html.haml +6 -0
- data/test/fixtures/test_mailer/custom_templating_extension.text.plain.haml +6 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.ignored.erb +1 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.rhtml.bak +1 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb +10 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.html.erb~ +10 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.plain.erb +2 -0
- data/test/fixtures/test_mailer/implicitly_multipart_example.text.yaml.erb +1 -0
- data/test/fixtures/test_mailer/included_subtemplate.text.plain.erb +1 -0
- data/test/fixtures/test_mailer/rxml_template.builder +2 -0
- data/test/fixtures/test_mailer/rxml_template.rxml +2 -0
- data/test/fixtures/test_mailer/signed_up.html.erb +3 -0
- data/test/fixtures/test_mailer/signed_up_with_url.erb +5 -0
- data/test/mail_helper_test.rb +95 -0
- data/test/mail_layout_test.rb +123 -0
- data/test/mail_render_test.rb +116 -0
- data/test/mail_service_test.rb +1145 -0
- data/test/quoting_test.rb +105 -0
- data/test/test_helper_test.rb +129 -0
- data/test/tmail_test.rb +22 -0
- data/test/url_test.rb +76 -0
- metadata +209 -0
data/CHANGELOG
ADDED
@@ -0,0 +1,387 @@
|
|
1
|
+
*2.3.11 (February 9, 2011)*
|
2
|
+
*2.3.10 (October 15, 2010)*
|
3
|
+
*2.3.9 (September 4, 2010)*
|
4
|
+
*2.3.8 (May 24, 2010)*
|
5
|
+
*2.3.7 (May 24, 2010)*
|
6
|
+
|
7
|
+
* Version bump.
|
8
|
+
|
9
|
+
|
10
|
+
*2.3.6 (May 23, 2010)*
|
11
|
+
|
12
|
+
* Upgrade TMail from 1.2.3 to 1.2.7. [Mikel Lindsaar]
|
13
|
+
|
14
|
+
|
15
|
+
*2.3.5 (November 25, 2009)*
|
16
|
+
|
17
|
+
* Minor Bug Fixes and deprecation warnings
|
18
|
+
|
19
|
+
|
20
|
+
*2.3.4 (September 4, 2009)*
|
21
|
+
|
22
|
+
* Minor bug fixes.
|
23
|
+
|
24
|
+
|
25
|
+
*2.3.3 (July 12, 2009)*
|
26
|
+
|
27
|
+
* No changes, just a version bump.
|
28
|
+
|
29
|
+
|
30
|
+
*2.3.2 [Final] (March 15, 2009)*
|
31
|
+
|
32
|
+
* Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP #1842 [Matt Jones]
|
33
|
+
|
34
|
+
* Fixed RFC-2045 quoted-printable bug #1421 [squadette]
|
35
|
+
|
36
|
+
* Fixed that no body charset would be set when there are attachments present #740 [Paweł Kondzior]
|
37
|
+
|
38
|
+
|
39
|
+
*2.2.1 [RC2] (November 14th, 2008)*
|
40
|
+
|
41
|
+
* Turn on STARTTLS if it is available in Net::SMTP (added in Ruby 1.8.7) and the SMTP server supports it (This is required for Gmail's SMTP server) #1336 [Grant Hollingworth]
|
42
|
+
|
43
|
+
|
44
|
+
*2.2.0 [RC1] (October 24th, 2008)*
|
45
|
+
|
46
|
+
* Add layout functionality to mailers [Pratik Naik]
|
47
|
+
|
48
|
+
Mailer layouts behaves just like controller layouts, except layout names need to
|
49
|
+
have '_mailer' postfix for them to be automatically picked up.
|
50
|
+
|
51
|
+
|
52
|
+
*2.1.0 (May 31st, 2008)*
|
53
|
+
|
54
|
+
* Fixed that a return-path header would be ignored #7572 [joost]
|
55
|
+
|
56
|
+
* Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. #8000 [iaddict, Tarmo Tänav]
|
57
|
+
|
58
|
+
* Updated TMail to version 1.2.1 [Mikel Lindsaar]
|
59
|
+
|
60
|
+
* Fixed that you don't have to call super in ActionMailer::TestCase#setup #10406 [jamesgolick]
|
61
|
+
|
62
|
+
|
63
|
+
*2.0.2* (December 16th, 2007)
|
64
|
+
|
65
|
+
* Included in Rails 2.0.2
|
66
|
+
|
67
|
+
|
68
|
+
*2.0.1* (December 7th, 2007)
|
69
|
+
|
70
|
+
* Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [Rick Olson]
|
71
|
+
|
72
|
+
* Pass the template_root as an array as ActionView's view_path
|
73
|
+
* Request templates with the "#{mailer_name}/#{action}" as opposed to just "#{action}"
|
74
|
+
|
75
|
+
* Fixed that partials would be broken when using text.plain.erb as the extension #10130 [java]
|
76
|
+
|
77
|
+
* Update README to use new smtp settings configuration API. Closes #10060 [psq]
|
78
|
+
|
79
|
+
* Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) #10033 [Zach Dennis]
|
80
|
+
|
81
|
+
* Update TMail to v1.1.0. Use an updated version of TMail if available. [Mikel Lindsaar]
|
82
|
+
|
83
|
+
* Introduce a new base test class for testing Mailers. ActionMailer::TestCase [Michael Koziarski]
|
84
|
+
|
85
|
+
* Fix silent failure of rxml templates. #9879 [jstewart]
|
86
|
+
|
87
|
+
* Fix attachment decoding when using the TMail C extension. #7861 [orangechicken]
|
88
|
+
|
89
|
+
* Increase mail delivery test coverage. #8692 [Kamal Fariz Mahyuddin]
|
90
|
+
|
91
|
+
* Register alternative template engines using ActionMailer::Base.register_template_extension('haml'). #7534 [cwd, Josh Peek]
|
92
|
+
|
93
|
+
* Only load ActionController::UrlWriter if ActionController is present [Rick Olson]
|
94
|
+
|
95
|
+
* Make sure parsed emails recognized attachments nested inside multipart parts. #6714 [Jamis Buck]
|
96
|
+
|
97
|
+
* Allow mailer actions named send by using __send__ internally. #6467 [iGEL]
|
98
|
+
|
99
|
+
* Add assert_emails and assert_no_emails to test the number of emails delivered. #6479 [Jonathan Viney]
|
100
|
+
# Assert total number of emails delivered:
|
101
|
+
assert_emails 0
|
102
|
+
ContactMailer.deliver_contact
|
103
|
+
assert_emails 1
|
104
|
+
|
105
|
+
# Assert number of emails delivered within a block:
|
106
|
+
assert_emails 1 do
|
107
|
+
post :signup, :name => 'Jonathan'
|
108
|
+
end
|
109
|
+
|
110
|
+
|
111
|
+
*1.3.3* (March 12th, 2007)
|
112
|
+
|
113
|
+
* Depend on Action Pack 1.13.3
|
114
|
+
|
115
|
+
|
116
|
+
*1.3.2* (February 5th, 2007)
|
117
|
+
|
118
|
+
* Deprecate server_settings renaming it to smtp_settings, add sendmail_settings to allow you to override the arguments to and location of the sendmail executable. [Michael Koziarski]
|
119
|
+
|
120
|
+
|
121
|
+
*1.3.1* (January 16th, 2007)
|
122
|
+
|
123
|
+
* Depend on Action Pack 1.13.1
|
124
|
+
|
125
|
+
|
126
|
+
*1.3.0* (January 16th, 2007)
|
127
|
+
|
128
|
+
* Make mime version default to 1.0. closes #2323 [ror@andreas-s.net]
|
129
|
+
|
130
|
+
* Make sure quoted-printable text is decoded correctly when only portions of the text are encoded. closes #3154. [jon@siliconcircus.com]
|
131
|
+
|
132
|
+
* Make sure DOS newlines in quoted-printable text are normalized to unix newlines before unquoting. closes #4166 and #4452. [Jamis Buck]
|
133
|
+
|
134
|
+
* Fixed that iconv decoding should catch InvalidEncoding #3153 [jon@siliconcircus.com]
|
135
|
+
|
136
|
+
* Tighten rescue clauses. #5985 [james@grayproductions.net]
|
137
|
+
|
138
|
+
* Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [David Heinemeier Hansson]
|
139
|
+
|
140
|
+
* Replace Reloadable with Reloadable::Deprecated. [Nicholas Seckar]
|
141
|
+
|
142
|
+
* Mailer template root applies to a class and its subclasses rather than acting globally. #5555 [somekool@gmail.com]
|
143
|
+
|
144
|
+
* Resolve action naming collision. #5520 [ssinghi@kreeti.com]
|
145
|
+
|
146
|
+
* ActionMailer::Base documentation rewrite. Closes #4991 [Kevin Clark, Marcel Molina Jr.]
|
147
|
+
|
148
|
+
* Replace alias method chaining with Module#alias_method_chain. [Marcel Molina Jr.]
|
149
|
+
|
150
|
+
* Replace Ruby's deprecated append_features in favor of included. [Marcel Molina Jr.]
|
151
|
+
|
152
|
+
* Correct spurious documentation example code which results in a SyntaxError. [Marcel Molina Jr.]
|
153
|
+
|
154
|
+
|
155
|
+
*1.2.1* (April 6th, 2006)
|
156
|
+
|
157
|
+
* Be part of Rails 1.1.1
|
158
|
+
|
159
|
+
|
160
|
+
*1.2.0* (March 27th, 2006)
|
161
|
+
|
162
|
+
* Nil charset caused subject line to be improperly quoted in implicitly multipart messages #2662 [ehalvorsen+rails@runbox.com]
|
163
|
+
|
164
|
+
* Parse content-type apart before using it so that sub-parts of the header can be set correctly #2918 [Jamis Buck]
|
165
|
+
|
166
|
+
* Make custom headers work in subparts #4034 [elan@bluemandrill.com]
|
167
|
+
|
168
|
+
* Template paths with dot chars in them no longer mess up implicit template selection for multipart messages #3332 [Chad Fowler]
|
169
|
+
|
170
|
+
* Make sure anything with content-disposition of "attachment" is passed to the attachment presenter when parsing an email body [Jamis Buck]
|
171
|
+
|
172
|
+
* Make sure TMail#attachments includes anything with content-disposition of "attachment", regardless of content-type [Jamis Buck]
|
173
|
+
|
174
|
+
|
175
|
+
*1.1.5* (December 13th, 2005)
|
176
|
+
|
177
|
+
* Become part of Rails 1.0
|
178
|
+
|
179
|
+
|
180
|
+
*1.1.4* (December 7th, 2005)
|
181
|
+
|
182
|
+
* Rename Version constant to VERSION. #2802 [Marcel Molina Jr.]
|
183
|
+
|
184
|
+
* Stricter matching for implicitly multipart filenames excludes files ending in unsupported extensions (such as foo.rhtml.bak) and without a two-part content type (such as foo.text.rhtml or foo.text.really.plain.rhtml). #2398 [Dave Burt <dave@burt.id.au>, Jeremy Kemper]
|
185
|
+
|
186
|
+
|
187
|
+
*1.1.3* (November 7th, 2005)
|
188
|
+
|
189
|
+
* Allow Mailers to have custom initialize methods that set default instance variables for all mail actions #2563 [mrj@bigpond.net.au]
|
190
|
+
|
191
|
+
|
192
|
+
*1.1.2* (October 26th, 2005)
|
193
|
+
|
194
|
+
* Upgraded to Action Pack 1.10.2
|
195
|
+
|
196
|
+
|
197
|
+
*1.1.1* (October 19th, 2005)
|
198
|
+
|
199
|
+
* Upgraded to Action Pack 1.10.1
|
200
|
+
|
201
|
+
|
202
|
+
*1.1.0* (October 16th, 2005)
|
203
|
+
|
204
|
+
* Update and extend documentation (rdoc)
|
205
|
+
|
206
|
+
* Minero Aoki made TMail available to Rails/ActionMailer under the MIT license (instead of LGPL) [RubyConf '05]
|
207
|
+
|
208
|
+
* Austin Ziegler made Text::Simple available to Rails/ActionMailer under a MIT-like licens [See rails ML, subject "Text::Format Licence Exception" on Oct 15, 2005]
|
209
|
+
|
210
|
+
* Fix vendor require paths to prevent files being required twice
|
211
|
+
|
212
|
+
* Don't add charset to content-type header for a part that contains subparts (for AOL compatibility) #2013 [John Long]
|
213
|
+
|
214
|
+
* Preserve underscores when unquoting message bodies #1930
|
215
|
+
|
216
|
+
* Encode multibyte characters correctly #1894
|
217
|
+
|
218
|
+
* Multipart messages specify a MIME-Version header automatically #2003 [John Long]
|
219
|
+
|
220
|
+
* Add a unified render method to ActionMailer (delegates to ActionView::Base#render)
|
221
|
+
|
222
|
+
* Move mailer initialization to a separate (overridable) method, so that subclasses may alter the various defaults #1727
|
223
|
+
|
224
|
+
* Look at content-location header (if available) to determine filename of attachments #1670
|
225
|
+
|
226
|
+
* ActionMailer::Base.deliver(email) had been accidentally removed, but was documented in the Rails book #1849
|
227
|
+
|
228
|
+
* Fix problem with sendmail delivery where headers should be delimited by \n characters instead of \r\n, which confuses some mail readers #1742 [Kent Sibilev]
|
229
|
+
|
230
|
+
|
231
|
+
*1.0.1* (11 July, 2005)
|
232
|
+
|
233
|
+
* Bind to Action Pack 1.9.1
|
234
|
+
|
235
|
+
|
236
|
+
*1.0.0* (6 July, 2005)
|
237
|
+
|
238
|
+
* Avoid adding nil header values #1392
|
239
|
+
|
240
|
+
* Better multipart support with implicit multipart/alternative and sorting of subparts [John Long]
|
241
|
+
|
242
|
+
* Allow for nested parts in multipart mails #1570 [Flurin Egger]
|
243
|
+
|
244
|
+
* Normalize line endings in outgoing mail bodies to "\n" #1536 [John Long]
|
245
|
+
|
246
|
+
* Allow template to be explicitly specified #1448 [tuxie@dekadance.se]
|
247
|
+
|
248
|
+
* Allow specific "multipart/xxx" content-type to be set on multipart messages #1412 [Flurin Egger]
|
249
|
+
|
250
|
+
* Unquoted @ characters in headers are now accepted in spite of RFC 822 #1206
|
251
|
+
|
252
|
+
* Helper support (borrowed from ActionPack)
|
253
|
+
|
254
|
+
* Silently ignore Errno::EINVAL errors when converting text.
|
255
|
+
|
256
|
+
* Don't cause an error when parsing an encoded attachment name #1340 [lon@speedymac.com]
|
257
|
+
|
258
|
+
* Nested multipart message parts are correctly processed in TMail::Mail#body
|
259
|
+
|
260
|
+
* BCC headers are removed when sending via SMTP #1402
|
261
|
+
|
262
|
+
* Added 'content_type' accessor, to allow content type to be set on a per-message basis. content_type defaults to "text/plain".
|
263
|
+
|
264
|
+
* Silently ignore Iconv::IllegalSequence errors when converting text #1341 [lon@speedymac.com]
|
265
|
+
|
266
|
+
* Support attachments and multipart messages.
|
267
|
+
|
268
|
+
* Added new accessors for the various mail properties.
|
269
|
+
|
270
|
+
* Fix to only perform the charset conversion if a 'from' and a 'to' charset are given (make no assumptions about what the charset was) #1276 [Jamis Buck]
|
271
|
+
|
272
|
+
* Fix attachments and content-type problems #1276 [Jamis Buck]
|
273
|
+
|
274
|
+
* Fixed the TMail#body method to look at the content-transfer-encoding header and unquote the body according to the rules it specifies #1265 [Jamis Buck]
|
275
|
+
|
276
|
+
* Added unquoting even if the iconv lib can't be loaded--in that case, only the charset conversion is skipped #1265 [Jamis Buck]
|
277
|
+
|
278
|
+
* Added automatic decoding of base64 bodies #1214 [Jamis Buck]
|
279
|
+
|
280
|
+
* Added that delivery errors are caught in a way so the mail is still returned whether the delivery was successful or not
|
281
|
+
|
282
|
+
* Fixed that email address like "Jamis Buck, M.D." <wild.medicine@example.net> would cause the quoter to generate emails resulting in "bad address" errors from the mail server #1220 [Jamis Buck]
|
283
|
+
|
284
|
+
|
285
|
+
*0.9.1* (20th April, 2005)
|
286
|
+
|
287
|
+
* Depend on Action Pack 1.8.1
|
288
|
+
|
289
|
+
|
290
|
+
*0.9.0* (19th April, 2005)
|
291
|
+
|
292
|
+
* Added that deliver_* will now return the email that was sent
|
293
|
+
|
294
|
+
* Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck]
|
295
|
+
|
296
|
+
* Fixed quoting for all address headers, not just to #955 [Jamis Buck]
|
297
|
+
|
298
|
+
* Fixed unquoting of emails that doesn't have an explicit charset #1036 [wolfgang@stufenlos.net]
|
299
|
+
|
300
|
+
|
301
|
+
*0.8.1* (27th March, 2005)
|
302
|
+
|
303
|
+
* Fixed that if charset was found that the end of a mime part declaration TMail would throw an error #919 [lon@speedymac.com]
|
304
|
+
|
305
|
+
* Fixed that TMail::Unquoter would fail to recognize quoting method if it was in lowercase #919 [lon@speedymac.com]
|
306
|
+
|
307
|
+
* Fixed that TMail::Encoder would fail when it attempts to parse e-mail addresses which are encoded using something other than the messages encoding method #919 [lon@speedymac.com]
|
308
|
+
|
309
|
+
* Added rescue for missing iconv library and throws warnings if subject/body is called on a TMail object without it instead
|
310
|
+
|
311
|
+
|
312
|
+
*0.8.0* (22th March, 2005)
|
313
|
+
|
314
|
+
* Added framework support for processing incoming emails with an Action Mailer class. See example in README.
|
315
|
+
|
316
|
+
|
317
|
+
*0.7.1* (7th March, 2005)
|
318
|
+
|
319
|
+
* Bind to newest Action Pack (1.5.1)
|
320
|
+
|
321
|
+
|
322
|
+
*0.7.0* (24th February, 2005)
|
323
|
+
|
324
|
+
* Added support for charsets for both subject and body. The default charset is now UTF-8 #673 [Jamis Buck]. Examples:
|
325
|
+
|
326
|
+
def iso_charset(recipient)
|
327
|
+
@recipients = recipient
|
328
|
+
@subject = "testing iso charsets"
|
329
|
+
@from = "system@loudthinking.com"
|
330
|
+
@body = "Nothing to see here."
|
331
|
+
@charset = "iso-8859-1"
|
332
|
+
end
|
333
|
+
|
334
|
+
def unencoded_subject(recipient)
|
335
|
+
@recipients = recipient
|
336
|
+
@subject = "testing unencoded subject"
|
337
|
+
@from = "system@loudthinking.com"
|
338
|
+
@body = "Nothing to see here."
|
339
|
+
@encode_subject = false
|
340
|
+
@charset = "iso-8859-1"
|
341
|
+
end
|
342
|
+
|
343
|
+
|
344
|
+
*0.6.1* (January 18th, 2005)
|
345
|
+
|
346
|
+
* Fixed sending of emails to use Tmail#from not the deprecated Tmail#from_address
|
347
|
+
|
348
|
+
|
349
|
+
*0.6* (January 17th, 2005)
|
350
|
+
|
351
|
+
* Fixed that bcc and cc should be settable through @bcc and @cc -- not just @headers["Bcc"] and @headers["Cc"] #453 [Eric Hodel]
|
352
|
+
|
353
|
+
* Fixed Action Mailer to be "warnings safe" so you can run with ruby -w and not get framework warnings #453 [Eric Hodel]
|
354
|
+
|
355
|
+
|
356
|
+
*0.5*
|
357
|
+
|
358
|
+
* Added access to custom headers, like cc, bcc, and reply-to #268 [Andreas Schwarz]. Example:
|
359
|
+
|
360
|
+
def post_notification(recipients, post)
|
361
|
+
@recipients = recipients
|
362
|
+
@from = post.author.email_address_with_name
|
363
|
+
@headers["bcc"] = SYSTEM_ADMINISTRATOR_EMAIL
|
364
|
+
@headers["reply-to"] = "notifications@example.com"
|
365
|
+
@subject = "[#{post.account.name} #{post.title}]"
|
366
|
+
@body["post"] = post
|
367
|
+
end
|
368
|
+
|
369
|
+
*0.4* (5)
|
370
|
+
|
371
|
+
* Consolidated the server configuration options into Base#server_settings= and expanded that with controls for authentication and more [Marten]
|
372
|
+
NOTE: This is an API change that could potentially break your application if you used the old application form. Please do change!
|
373
|
+
|
374
|
+
* Added Base#deliveries as an accessor for an array of emails sent out through that ActionMailer class when using the :test delivery option. [Jeremy Kemper]
|
375
|
+
|
376
|
+
* Added Base#perform_deliveries= which can be set to false to turn off the actual delivery of the email through smtp or sendmail.
|
377
|
+
This is especially useful for functional testing that shouldn't send off real emails, but still trigger delivery_* methods.
|
378
|
+
|
379
|
+
* Added option to specify delivery method with Base#delivery_method=. Default is :smtp and :sendmail is currently the only other option.
|
380
|
+
Sendmail is assumed to be present at "/usr/sbin/sendmail" if that option is used. [Kent Sibilev]
|
381
|
+
|
382
|
+
* Dropped "include TMail" as it added to much baggage into the default namespace (like Version) [Chad Fowler]
|
383
|
+
|
384
|
+
|
385
|
+
*0.3*
|
386
|
+
|
387
|
+
* First release
|
data/MIT-LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
Copyright (c) 2004-2010 David Heinemeier Hansson
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
data/README
ADDED
@@ -0,0 +1,149 @@
|
|
1
|
+
= Action Mailer -- Easy email delivery and testing
|
2
|
+
|
3
|
+
Action Mailer is a framework for designing email-service layers. These layers
|
4
|
+
are used to consolidate code for sending out forgotten passwords, welcome
|
5
|
+
wishes on signup, invoices for billing, and any other use case that requires
|
6
|
+
a written notification to either a person or another system.
|
7
|
+
|
8
|
+
Additionally, an Action Mailer class can be used to process incoming email,
|
9
|
+
such as allowing a weblog to accept new posts from an email (which could even
|
10
|
+
have been sent from a phone).
|
11
|
+
|
12
|
+
== Sending emails
|
13
|
+
|
14
|
+
The framework works by setting up all the email details, except the body,
|
15
|
+
in methods on the service layer. Subject, recipients, sender, and timestamp
|
16
|
+
are all set up this way. An example of such a method:
|
17
|
+
|
18
|
+
def signed_up(recipient)
|
19
|
+
recipients recipient
|
20
|
+
subject "[Signed up] Welcome #{recipient}"
|
21
|
+
from "system@loudthinking.com"
|
22
|
+
body :recipient => recipient
|
23
|
+
end
|
24
|
+
|
25
|
+
The body of the email is created by using an Action View template (regular
|
26
|
+
ERb) that has the content of the body hash parameter available as instance variables.
|
27
|
+
So the corresponding body template for the method above could look like this:
|
28
|
+
|
29
|
+
Hello there,
|
30
|
+
|
31
|
+
Mr. <%= @recipient %>
|
32
|
+
|
33
|
+
And if the recipient was given as "david@loudthinking.com", the email
|
34
|
+
generated would look like this:
|
35
|
+
|
36
|
+
Date: Sun, 12 Dec 2004 00:00:00 +0100
|
37
|
+
From: system@loudthinking.com
|
38
|
+
To: david@loudthinking.com
|
39
|
+
Subject: [Signed up] Welcome david@loudthinking.com
|
40
|
+
|
41
|
+
Hello there,
|
42
|
+
|
43
|
+
Mr. david@loudthinking.com
|
44
|
+
|
45
|
+
You never actually call the instance methods like signed_up directly. Instead,
|
46
|
+
you call class methods like deliver_* and create_* that are automatically
|
47
|
+
created for each instance method. So if the signed_up method sat on
|
48
|
+
ApplicationMailer, it would look like this:
|
49
|
+
|
50
|
+
ApplicationMailer.create_signed_up("david@loudthinking.com") # => tmail object for testing
|
51
|
+
ApplicationMailer.deliver_signed_up("david@loudthinking.com") # sends the email
|
52
|
+
ApplicationMailer.new.signed_up("david@loudthinking.com") # won't work!
|
53
|
+
|
54
|
+
== Receiving emails
|
55
|
+
|
56
|
+
To receive emails, you need to implement a public instance method called receive that takes a
|
57
|
+
tmail object as its single parameter. The Action Mailer framework has a corresponding class method,
|
58
|
+
which is also called receive, that accepts a raw, unprocessed email as a string, which it then turns
|
59
|
+
into the tmail object and calls the receive instance method.
|
60
|
+
|
61
|
+
Example:
|
62
|
+
|
63
|
+
class Mailman < ActionMailer::Base
|
64
|
+
def receive(email)
|
65
|
+
page = Page.find_by_address(email.to.first)
|
66
|
+
page.emails.create(
|
67
|
+
:subject => email.subject, :body => email.body
|
68
|
+
)
|
69
|
+
|
70
|
+
if email.has_attachments?
|
71
|
+
for attachment in email.attachments
|
72
|
+
page.attachments.create({
|
73
|
+
:file => attachment, :description => email.subject
|
74
|
+
})
|
75
|
+
end
|
76
|
+
end
|
77
|
+
end
|
78
|
+
end
|
79
|
+
|
80
|
+
This Mailman can be the target for Postfix or other MTAs. In Rails, you would use the runner in the
|
81
|
+
trivial case like this:
|
82
|
+
|
83
|
+
./script/runner 'Mailman.receive(STDIN.read)'
|
84
|
+
|
85
|
+
However, invoking Rails in the runner for each mail to be received is very resource intensive. A single
|
86
|
+
instance of Rails should be run within a daemon if it is going to be utilized to process more than just
|
87
|
+
a limited number of email.
|
88
|
+
|
89
|
+
== Configuration
|
90
|
+
|
91
|
+
The Base class has the full list of configuration options. Here's an example:
|
92
|
+
|
93
|
+
ActionMailer::Base.smtp_settings = {
|
94
|
+
:address => 'smtp.yourserver.com', # default: localhost
|
95
|
+
:port => '25', # default: 25
|
96
|
+
:user_name => 'user',
|
97
|
+
:password => 'pass',
|
98
|
+
:authentication => :plain # :plain, :login or :cram_md5
|
99
|
+
}
|
100
|
+
|
101
|
+
== Dependencies
|
102
|
+
|
103
|
+
Action Mailer requires that the Action Pack is either available to be required immediately
|
104
|
+
or is accessible as a GEM.
|
105
|
+
|
106
|
+
|
107
|
+
== Bundled software
|
108
|
+
|
109
|
+
* tmail 0.10.8 by Minero Aoki released under LGPL
|
110
|
+
Read more on http://i.loveruby.net/en/prog/tmail.html
|
111
|
+
|
112
|
+
* Text::Format 0.63 by Austin Ziegler released under OpenSource
|
113
|
+
Read more on http://www.halostatue.ca/ruby/Text__Format.html
|
114
|
+
|
115
|
+
|
116
|
+
== Download
|
117
|
+
|
118
|
+
The latest version of Action Mailer can be found at
|
119
|
+
|
120
|
+
* http://rubyforge.org/project/showfiles.php?group_id=361
|
121
|
+
|
122
|
+
Documentation can be found at
|
123
|
+
|
124
|
+
* http://actionmailer.rubyonrails.org
|
125
|
+
|
126
|
+
|
127
|
+
== Installation
|
128
|
+
|
129
|
+
You can install Action Mailer with the following command.
|
130
|
+
|
131
|
+
% [sudo] ruby install.rb
|
132
|
+
|
133
|
+
from its distribution directory.
|
134
|
+
|
135
|
+
|
136
|
+
== License
|
137
|
+
|
138
|
+
Action Mailer is released under the MIT license.
|
139
|
+
|
140
|
+
|
141
|
+
== Support
|
142
|
+
|
143
|
+
The Action Mailer homepage is http://www.rubyonrails.org. You can find
|
144
|
+
the Action Mailer RubyForge page at http://rubyforge.org/projects/actionmailer.
|
145
|
+
And as Jim from Rake says:
|
146
|
+
|
147
|
+
Feel free to submit commits or feature requests. If you send a patch,
|
148
|
+
remember to update the corresponding unit tests. If fact, I prefer
|
149
|
+
new feature to be submitted in the form of new unit tests.
|