Commit Graph

337 Commits

Author SHA1 Message Date
José Valim
4747a9a57e Getting rid of some warnings in AM suite. 2009-12-27 12:18:46 +01:00
José Valim
47e5caa96b Merge Mail with latest Rails and move mail gem to Gemfile. 2009-12-27 12:09:20 +01:00
Mikel Lindsaar
331d375cc3 Changing body to use :to_s instead of :decoded... better use case 2009-12-27 20:56:16 +11:00
Mikel Lindsaar
4e1fa4912d Updating actionmailer to call :to_s on all field values instead of decoded 2009-12-27 18:38:30 +11:00
José Valim
ee70d1b6ad adv_attr_accessors in ActionMailer are not sent to the views, use the mailer object if you need to access the subject, recipients, from, etc. 2009-12-25 21:35:40 +01:00
José Valim
4964d3b02c Make ActionMailer::Base inherit from AbstractController::Base
Signed-off-by: Yehuda Katz <wycats@Yehuda-Katz.local>
2009-12-22 11:29:06 -08:00
Mikel Lindsaar
63b124b043 Merged in latest changes from rails/master 2009-12-17 12:23:08 +11:00
Mikel Lindsaar
418639b4cf Fixes for working with 1.9.1-head 2009-12-17 12:00:32 +11:00
Mikel Lindsaar
186cd7bc53 Merge branch 'rails'
Conflicts:
	actionmailer/lib/action_mailer.rb
	actionmailer/lib/action_mailer/delivery_method/smtp.rb
2009-12-17 11:24:02 +11:00
Joshua Peek
7ee5843c3c Fully expand relative rails framework paths and make sure we aren't
adding any to the load path more than once.
2009-12-16 11:56:51 -06:00
Joshua Peek
6ac32a8328 Define a welcome controller in mailer tests 2009-11-29 18:28:45 -06:00
Michael Koziarski
7e0aa35c20 avoid generating invalid SMTP commands in ruby pre 1.9
Signed-off-by: Michael Koziarski <michael@koziarski.com>

Conflicts:

	actionmailer/lib/action_mailer/base.rb
2009-11-28 13:34:05 +13:00
Mikel Lindsaar
5f2395041d Merge branch 'master' of git://github.com/rails/rails into rails_master 2009-11-24 21:45:14 +11:00
Jeremy Kemper
671538cd6e Merge commit 'mikel/master' into mail
Conflicts:
	actionmailer/lib/action_mailer.rb
2009-11-23 15:29:35 -08:00
Mikel Lindsaar
906e308220 Fixed up incompatible encoding problem for Ruby 1.9 in test suite 2009-11-23 20:58:22 +11:00
Mikel Lindsaar
cc391c3022 Deprecating attachment :body => 'string' in favour of attachment :data => 'string' 2009-11-23 20:53:07 +11:00
Jeremy Kemper
d98fee67e2 Never require jcode 2009-11-22 15:41:29 -08:00
Jeremy Kemper
e68bc3f14e Merge commit 'origin/master' into mail 2009-11-22 10:31:47 -08:00
Mikel Lindsaar
747d56881a 131 tests, 309 assertions, 0 failures, 0 errors 2009-11-22 23:20:57 +11:00
Mikel Lindsaar
f6f70540bb Updating tests for Mail gem 2009-11-22 00:04:36 +11:00
Mikel Lindsaar
0e38f5bdcc 131 tests, 266 assertions, 9 failures, 6 errors 2009-11-21 23:55:53 +11:00
Mikel Lindsaar
6456a08334 Down to 13 failures, 14 errors 2009-11-20 22:01:40 +11:00
Mikel Lindsaar
a5e6295d72 Down to 30 failures total 2009-11-20 21:19:10 +11:00
Mikel Lindsaar
539d9b355f More updates... 45 errors left to get it working with Mail gem 2009-11-20 14:10:57 +11:00
Mikel Lindsaar
15d7cac282 Starting again on actionmailer integration with mail 2009-11-12 16:08:50 +11:00
Joshua Peek
11e798ae0f Avoid adding component lib/ to load path multiple times 2009-11-09 23:28:36 -06:00
José Valim
4a1f438781 Change mailer subjects lookup. 2009-11-09 10:57:53 -08:00
José Valim
2aafdc8396 Use I18n on ActionMailer subjects by default. 2009-11-01 02:23:49 +01:00
José Valim
e9667ad1f0 Make tests run without deprecation warning (just one left). 2009-11-01 02:23:48 +01:00
José Valim
418c3f801c Another refactoring on AM. body is deprecated, use render instead. 2009-11-01 02:23:48 +01:00
José Valim
43d5504f0a Move all render and layout pieces required in ActionMailer from ActionController to AbstractController. 2009-11-01 02:23:48 +01:00
José Valim
684c2dc208 Remove ActionMailer helpers and rely on AbstractController one. 2009-11-01 02:23:48 +01:00
Matthew Rudy Jacobs
f4f76772fb abstract all of the ActionMailer delivery methods into their own classes. thereby the following are equivalent
ActionMailer::Base.delivery_method = :smtp
  ActionMailer::Base.delivery_method = ActionMailer::DeliveryMethod::Smtp

we could equally set our own custom object
as long as it provides the instance method :perform_delivery(mail)

eg.

  class MySmsDeliveryMethod
    def perform_delivery(mail)
      Sms.send(mail['to'], mail['body'])
    end
  end

  MySmsMailer.delivery_method = MySmsDeliveryMethod.new

Signed-off-by: José Valim <jose.valim@gmail.com>
2009-11-01 02:23:47 +01:00
Yehuda Katz + Carl Lerche
4f6d6f7031 Have all the tests running off a single Gemfile 2009-10-20 16:34:44 -07:00
Joshua Peek
3ccaabc6c6 Need to use "use_controllers" for nonexistent controller in AM test 2009-10-18 10:39:21 -05:00
Yehuda Katz
e1490d4e4c Change config implementation in AV slightly 2009-10-15 14:41:59 -07:00
Jeremy Kemper
d5de94d6b7 Fix AM tests by configuring AV 2009-10-15 00:22:15 -07:00
Jeremy Kemper
4484f0bccf Don't push siblings on load path if using bundled env 2009-10-14 20:59:45 -07:00
Jeremy Kemper
6395c7bed2 Mark html safety 2009-10-09 18:36:58 -07:00
Pratik Naik
96b575d6dc Get rid of parenthesize argument warnings 2009-08-09 16:00:53 +01:00
Eric Davis
fbe6c3c195 Adds a :file delivery_method to save email to a file on disk
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2438 state:committed]
2009-08-08 16:32:17 +12:00
Matt Duncan
5fdc33c1a3 Default sent_on time to now in ActionMailer
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2607 state:committed]
2009-08-08 14:11:32 +12:00
Yehuda Katz
0612fd0f09 Replace _render_template_with_layout with _render_template since the layout is optional 2009-08-07 03:18:45 -03:00
Yehuda Katz + Carl Lerche
7583a24ee0 Move mocha down below initial T::U require and bump version to 0.9.7 [#2858 state:resolved] 2009-07-01 11:53:17 -07:00
Chad Woolley
5679bf64d5 Fix failing CI test (broken in 2daac47 or e693f45): make test_multipart_with_template_path_with_dots only test path with dots, and stop failing on unrelated mimetype assertion. The image/jpeg multipart content type is already tested in test_explicitly_multipart_messages.
Signed-off-by: Yehuda Katz <wycats@yehuda-katzs-macbookpro41.local>
2009-05-27 21:38:23 +02:00
Jeremy Kemper
df2d96a7f0 Move misplaced test 2009-05-22 15:32:35 -07:00
Yehuda Katz + Carl Lerche
ab83db9d06 Fixes ActionMailer to work with the ActionView refactoring 2009-04-27 12:34:25 -07:00
Yehuda Katz + Carl Lerche
0a132c2fe1 Refactor ActionView::Path
* Decouple from ActionController and ActionMailer
  * Bring back localization support.
  * Prepare to decouple templates from the filesystem.
  * Prepare to decouple localization from ActionView
  * Fix ActionMailer to take advantage of ActionView::Path
2009-04-22 17:24:41 -07:00
Carl Lerche & Yehuda Katz
906aebceed Bring abstract_controller up to date with rails/master
Resolved all the conflicts since 2.3.0 -> HEAD. Following is a list
of commits that could not be applied cleanly or are obviated with the
abstract_controller refactor. They all need to be revisited to ensure
that fixes made in 2.3 do not reappear in 3.0:

2259ecf368e6a6715966f69216e3ee86bf1a82a7
AR not available
  * This will be reimplemented with ActionORM or equivalent

06182ea02e92afad579998aa80144588e8865ac3
implicitly rendering a js response should not use the default layout
[#1844 state:resolved]
  * This will be handled generically

893e9eb99504705419ad6edac14d00e71cef5f12
Improve view rendering performance in development mode and reinstate
template recompiling in production [#1909 state:resolved]
  * We will need to reimplement rails-dev-boost on top of the refactor;
    the changes here are very implementation specific and cannot be
    cleanly applied. The following commits are implicated:

      199e750d46c04970b5e7684998d09405648ecbd4
      3942cb406e1d5db0ac00e03153809cc8dc4cc4db
      f8ea9f85d4f1e3e6f3b5d895bef6b013aa4b0690
      e3b166aab37ddc2fbab030b146eb61713b91bf55
      ae9f258e03c9fd5088da12c1c6cd216cc89a01f7
      44423126c6f6133a1d9cf1d0832b527e8711d40f

0cb020b4d6d838025859bd60fb8151c8e21b8e84
workaround for picking layouts based on wrong view_paths
[#1974 state:resolved]
  * The specifics of this commit no longer apply. Since it is a two-line
    commit, we will reimplement this change.

8c5cc66a831aadb159f3daaffa4208064c30af0e
make action_controller/layouts pick templates from the current instance's
view_paths instead of the class view_paths [#1974 state:resolved]
  * This does not apply at all. It should be trivial to apply the feature
    to the reimplemented ActionController::Base.

87e8b162463f13bd50d27398f020769460a770e3
fix HTML fallback for explicit templates [#2052 state:resolved]
  * There were a number of patches related to this that simply compounded
    each other. Basically none of them apply cleanly, and the underlying
    issue needs to be revisited. After discussing the underlying problem
    with Koz, we will defer these fixes for further discussion.
2009-04-13 15:18:45 -07:00
Sean Dague
1dff106888 Allow custom type for multipart emails [#1691 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-03-10 16:38:37 +00:00
Jeremy Kemper
1c36172c13 Ruby 1.9 compat: rename deprecated assert_raises to assert_raise.
[#1617 state:resolved]
2009-03-08 13:11:58 -07:00
Elliott Wood
c41ed929bb Removed the "charset" parameter from the Content-Type header of multipart sections of nested multipart messages.
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#2109 state:committed]
2009-03-02 18:51:30 +13:00
thedarkone
6bf9b69bde Fix a failing mailer test. 2009-02-20 12:08:05 -06:00
thedarkone
3942cb406e Port fast reloadable templates from rails-dev-boost. 2009-02-12 13:04:12 -06:00
Matt Jones
250dfb18af Fixed that ActionMailer should send correctly formatted Return-Path in MAIL FROM for SMTP [#1842 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2009-02-05 20:53:02 +01:00
Jeremy Kemper
b302e023b7 Require rubygems 2009-02-03 18:58:06 -08:00
Jeremy Kemper
278186534c Bump mocha requirement for Ruby 1.9 compat. Remove uses_mocha. 2009-02-03 18:40:22 -08:00
Yehuda Katz
eb9af20b7c Begin unifying the interface between ActionController and ActionView 2009-01-22 16:18:10 -06:00
Jose' Valim
c2e7851fb2 Add ActionMailer::Base#enable_starttls_auto option for enabling/disabling STARTTLS. [#1731 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-18 04:19:18 +00:00
Mike Gunderloy
1e02d95d60 Make ActioMailer quoting test play nice with Ruby 1.9 [#1726 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2009-01-16 17:25:37 +00:00
Joshua Peek
558ab327b7 Clean up view path cruft and split path implementations into Template::Path and Template::EagerPath 2008-12-29 19:27:19 -06:00
Joshua Peek
858a420ce1 Ensure the template format is always passed to the template finder. Now we can cleanup some nasty stuff. 2008-12-21 17:24:16 -06:00
Jeremy Kemper
781e29be0a Fix tests broken by switch to Pathname 2008-12-09 11:39:45 -08:00
Joshua Peek
7c0dfa35db Register bogus template handlers for ActionMailer test fixtures 2008-12-03 13:58:47 -06:00
Tekin Suleyman
dab78e55cf Ensure ActionMailer doesn't blow up when a two argument proc is set for the asset host
Signed-off-by: Michael Koziarski <michael@koziarski.com>
[#1394 state:committed]
2008-12-01 19:38:25 +01:00
Jeremy Kemper
6d91e7a7d6 Remove explicit tmail requires in favor of autoload 2008-11-23 13:16:39 -08:00
Colin Curtin
1d4554d766 ActionMailer should respect content type when choosing layouts
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-11-21 04:09:14 +05:30
Alexey Mahotkin
84583657f4 Fixed RFC-2045 quoted-printable bug [#1421 state:committed]
http://www.faqs.org/rfcs/rfc2045.html says:

          may be
          represented by an "=" followed by a two digit
          hexadecimal representation of the octet's value.  The
          digits of the hexadecimal alphabet, for this purpose,
          are "0123456789ABCDEF".  Uppercase letters must be
          used; lowercase letters are not allowed.

ActionMailer, however, used "=%02x" specification.

Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-20 23:10:15 +01:00
Jeremy Kemper
eeea1a26ec Merge branch 'master' into testing 2008-11-15 12:21:04 -08:00
David Heinemeier Hansson
e6b33a8337 Added lambda merging to OptionMerger (especially useful with named_scope and with_options) [#740 state:commited] (Paweł Kondzior) 2008-11-15 16:44:47 +01:00
Joel Chippindale
c65075feb6 Fixed method_missing for ActionMailer so it no longer matches methods where deliver or create are not a suffix [#1318 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-11 09:46:29 -06:00
Joel Chippindale
a62e9e90d8 Fix for ActionMailer::Base.method_missing so that it raises NoMethodError when no method is found [#1330 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-11-11 09:46:29 -06:00
Jeremy Kemper
17ac2a2482 Ruby 1.9 compat: check for minitest's assertion also 2008-11-08 22:49:28 -05:00
Grant Hollingworth
732c724df6 Turn on STARTTLS if it is available in Net::SMTP (added in Ruby 1.8.7) and the SMTP server supports it [#1336 state:committed]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-11-06 13:07:16 +01:00
madlep
2def5b6314 Fixed load path for actionmailer and activesupport tests to always load from local lib files.
[#983 state:committed]

Signed-off-by: Jeremy Kemper <jeremy@bitsweat.net>
2008-10-04 07:57:18 -07:00
Joshua Peek
28bf2fa038 Protect body ivar from being clobbered by the mailer template assigns 2008-09-28 12:31:45 -05:00
U-ESCAPEE\Mack
f3f7d166d8 Fixed problem causes by leftover backup templates ending in tilde [state:committed #969]
Signed-off-by: David Heinemeier Hansson <david@loudthinking.com>
2008-09-09 23:29:29 -05:00
David Heinemeier Hansson
6228220c9b Revert "Revert "Add layout functionality to mailers.""
This reverts commit 36c6aa01ee0a7aee5b0510a8e649c44de318b060.
2008-09-09 17:25:09 -05:00
David Heinemeier Hansson
36c6aa01ee Revert "Add layout functionality to mailers."
This reverts commit e9a8e0053be3b293ab89fb584f1d660063f107aa.
2008-09-09 17:20:55 -05:00
Pratik Naik
e9a8e0053b Add layout functionality to mailers.
Mailer layouts behaves just like controller layouts, except layout names need to
have '_mailer' postfix for them to be automatically picked up.
2008-08-31 19:17:42 +01:00
James Mead
3cf773b187 ActionMailer should respond_to? to methods handled by method_missing [#700 state:resolved]
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-08-29 15:09:47 -05:00
Joshua Peek
c0dd0cee46 Removed old deprecation test because the warning was removed in 1129a24 2008-08-22 13:43:34 -05:00
Joshua Peek
04248c6208 Ensure templates are rendered if all the parts are already processed 2008-08-13 19:04:56 -05:00
Joshua Peek
b2504f8ba0 Tidy up ActionMailer rendering logic to take advantage of view path cache instead of using file system lookups 2008-08-06 20:11:21 -05:00
Tarmo Tänav
656f0e7c6c Fix file permissions
Signed-off-by: Joshua Peek <josh@joshpeek.com>
2008-07-31 16:36:23 -05:00
Joshua Peek
e23156e87b Only create a path for ActionMailer template root instead of a path set. Better fix than 7461227 2008-07-19 12:35:42 -05:00
Joshua Peek
b74b97fef5 Update uses_mocha in ActionMailer and ActiveResource 2008-07-19 11:14:12 -05:00
Joshua Peek
7d5c447d9c Stubba is included in Mocha already 2008-07-11 11:12:53 -05:00
Joshua Peek
bec4b69a3b Replaced TemplateFinder abstraction with ViewLoadPaths 2008-06-17 21:21:07 -05:00
Adam
cf6299dbd7 Add ActionMailer#reply_to. [#245 state:resolved]
Signed-off-by: Pratik Naik <pratiknaik@gmail.com>
2008-05-29 10:38:00 +01:00
Jeremy Kemper
940cf0cacd Bah, don't test TMail in AM
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9219 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 18:32:10 +00:00
Jeremy Kemper
5c17a74d59 Ruby 1.9 compat: compare with same encoding
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9218 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-03 17:28:05 +00:00
Jeremy Kemper
767be30e61 force_encoding to ascii-8bit instead of nil
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9184 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-04-01 05:32:11 +00:00
Jeremy Kemper
af74077544 Ruby 1.9 compat: mark utf-8 encoding.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@9165 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-03-31 05:31:37 +00:00
Jeremy Kemper
218417b8a9 Remove empty .rhtml templates
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8820 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-07 23:10:01 +00:00
Jeremy Kemper
fbd3eb7142 Less verbose mail logging: just recipients for :info log level; the whole email for :debug only. Closes #8000.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8781 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-02-02 05:32:15 +00:00
Jeremy Kemper
abfab89fd8 Ruby 1.9 compat: test encoding fixes. Closes #10597 [murphy]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-19 03:03:38 +00:00
Rick Olson
2dda639120 Updated TMail to version 1.2.1 [raasdnil]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8620 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-11 01:55:20 +00:00
Jeremy Kemper
139b92495f * Continue evolution toward ActiveSupport::TestCase and friends. #10679 [Josh Peek]
* TestCase: introduce declared setup and teardown callbacks. Pass a list of methods and an optional block to call before setup or after teardown. Setup callbacks are run in the order declared; teardown callbacks are run in reverse.  [Jeremy Kemper]


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8570 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:34:15 +00:00
Jeremy Kemper
1ad87adc9f require abstract_unit directly since test is in load path
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8565 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-05 13:32:22 +00:00
David Heinemeier Hansson
6a6367d7d2 Fixed that you don't have to call super in ActionMailer::TestCase#setup (closes #10406) [jamesgolick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8536 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2008-01-03 00:40:28 +00:00
Michael Koziarski
f1047173e8 Remove old tests which relied on @ being an ATOM to work around old Mail.app bugs. Closes #10317 [mikel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8257 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-12-02 20:31:39 +00:00
Michael Koziarski
1d32cec17d Allow body to be specified for nested parts with action mailer. Closes #10271 [redinger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8238 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-29 02:52:49 +00:00
Rick Olson
bd5ed65110 Update ActionMailer so it treats ActionView the same way that ActionController does. Closes #10244 [rick]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8212 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-26 03:36:28 +00:00
Michael Koziarski
e0ce691187 Add missing sub template fixtures. References #10130 [java]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8188 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-22 05:01:43 +00:00
David Heinemeier Hansson
a76490d917 Fixed that partial rendering should look at the type of the first render to determine its own type if no other clues are available (like when using text.plain.erb as the extension in AM) (closes #10130) [java] Fixed that partials would be broken when using text.plain.erb as the extension #10130 [java]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8166 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-18 22:01:33 +00:00
David Heinemeier Hansson
57cde63138 Allow ActionMailer subclasses to individually set their delivery method (so two subclasses can have different delivery methods) (closes #10033) [zdennis]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8111 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-07 16:05:17 +00:00
Rick Olson
2a51c8682d Update TMail to v1.1.0. Use an updated version of TMail if available. [mikel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8084 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-11-06 14:24:32 +00:00
Michael Koziarski
2283524dff Test which fails without [8052] [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8053 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-29 04:13:51 +00:00
Michael Koziarski
2cc0cac3ef Introduce TestCase subclasses for testing rails applications allowing tests to be DRY'd up a bit and to provide a path toward tidying up our monkeypatching of test/unit.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@8022 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-26 02:21:21 +00:00
Jeremy Kemper
faa455a435 Missed mailer adds.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7929 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-16 05:05:03 +00:00
Jeremy Kemper
cf2ee1451b Fix silent failure of rxml templates. Closes #9879.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7921 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-15 20:30:48 +00:00
Tobias Lütke
19c9c7fafb Set default charset of MTAs to ISO instead of us-ascii (unless reported otherwise)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7819 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-10-09 13:34:51 +00:00
Michael Koziarski
7573791284 Disable the routing optimisation code when dealing with foo_url helpers. Add test to actionmailer to expose the problem they introduced. References #9450 [Koz]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7572 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 19:20:06 +00:00
David Heinemeier Hansson
6ccf503229 Test requirement fix (closes #9276) [lazyatom]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7547 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 17:37:39 +00:00
David Heinemeier Hansson
6203d4574c Improved test coverage (closes #7571) [joost]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7545 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-22 17:32:39 +00:00
Jeremy Kemper
12f8f89307 Fix attachment decoding when using the TMail C extension. Closes #7861.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7476 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-09-14 05:30:52 +00:00
Jeremy Kemper
e963354124 Increase mail delivery test coverage. Closes #8692.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@7070 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-20 06:50:43 +00:00
Jeremy Kemper
cd9d1711da Missed svn adds. References #7534.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6969 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-08 04:40:12 +00:00
Jeremy Kemper
271404e8b9 Register alternative template engines using ActionMailer::Base.register_template_extension('haml'). Closes #7534.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6962 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-06-07 23:42:47 +00:00
Jamis Buck
f9a4774e0e Make sure parsed emails recognize attachments nested in multpart parts (closes #6714)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6207 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-22 19:04:00 +00:00
Jamis Buck
b6923c2b29 Fix broken tests
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6206 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-22 19:02:14 +00:00
David Heinemeier Hansson
21187c0fb4 Apply the rest of Chads patch
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6180 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-02-21 00:29:44 +00:00
Michael Koziarski
704f2cc6de Improve Test Coverage for raise_delivery_errors. [kevinclark] closes #7152
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@6006 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2007-01-21 23:20:44 +00:00
Jeremy Kemper
c3ff04b05d Allow mailer actions named send by using __send__ internally. Closes #6467.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5505 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-13 05:03:48 +00:00
Jeremy Kemper
ba553f9424 Add assert_emails and assert_no_emails to test the number of emails delivered. Closes #6479.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5436 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-11-05 21:56:18 +00:00
Jamis Buck
45b5555f4c Make mime version default to 1.0. closes #2323
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5081 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-09 21:56:38 +00:00
Jamis Buck
4d9ca4d9fb Make sure quoted-printable text is decoded correctly when only portions of the text are encoded. closes #3154.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5080 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-09 21:14:43 +00:00
Jamis Buck
3e7aa0391f Make sure DOS newlines in quoted-printable text are normalized to unix newlines before unquoting. closes $166 and #4452
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@5079 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-09 20:16:42 +00:00
Jeremy Kemper
be54075956 set ActiveSupport::Deprecation.debug = true to see backtraces for deprecation callers. off by default. on for Rails tests.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4966 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-04 03:38:13 +00:00
David Heinemeier Hansson
3859d6da6e Added test for custom headers on parts (closes #3043)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4903 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-09-02 19:35:55 +00:00
David Heinemeier Hansson
c064802de9 Automatically included ActionController::UrlWriter, such that URL generation can happen within ActionMailer controllers. [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4818 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-08-25 06:48:15 +00:00
Jeremy Kemper
d954ee21b8 Add forgotten test/abstract_unit
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4533 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-07-03 21:14:04 +00:00
Jeremy Kemper
5446ecd5b9 Mailer template root applies to a class and its subclasses rather than acting globally. Closes #5555.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4523 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-30 05:27:05 +00:00
Jeremy Kemper
f3aa7c1e64 r4730@asus: jeremy | 2006-06-29 13:13:38 -0700
Avoid naming collision among compiled view methods. Back out AM workaround. References #5520.


git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4512 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 20:14:33 +00:00
Jeremy Kemper
1fd9a46d71 Resolve conflict among mailer actions with the same name. Closes #5520.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4509 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-06-29 01:54:16 +00:00
Jamis Buck
49efa02b9e Nil charset caused subject line to be improperly quoted in implicitly multipart messages (closes #2662)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3960 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-19 00:18:50 +00:00
Jamis Buck
db0e8ff1c3 Parse content-type apart before using it so that sub-parts of the header can be set correctly (closes #2918)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3959 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 23:53:07 +00:00
Jamis Buck
a46214c4f9 Make custom headers work in subparts (closes #4034)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3956 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-03-18 23:06:25 +00:00
David Heinemeier Hansson
4bd80f110d Make TMail::Mail#has_attachments? use logic from #attachment? (closes #3815) [devslashnull@gmail.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3652 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-02-25 23:38:48 +00:00
Jamis Buck
34df9be0e5 Template paths with dot chars in them no longer mess up implicit template selection for multipart messages (closes #3332)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3495 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-29 02:25:15 +00:00
Jamis Buck
185cca238b Make sure anything with content-disposition of "attachment" is passed to the attachment presenter when parsing an email body
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3475 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-23 16:48:24 +00:00
Jamis Buck
acfb8b6191 Make sure TMail#attachments includes anything with content-disposition of "attachment", regardless of content-type
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3474 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2006-01-23 16:37:46 +00:00
Jeremy Kemper
f2ee215bec 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). Closes #2398.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@3040 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-15 08:36:38 +00:00
Jamis Buck
afe75566cc Add a new test case to demonstrate that subject headers are being properly encoded for multipart messages
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2893 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-11-06 13:41:12 +00:00
Jamis Buck
8373b55055 * Don't add charset to content-type header for a part that contains subparts (for AOL compatibility) #2013 [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2091 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-01 16:00:08 +00:00
Jamis Buck
a322514871 Preserve underscores when unquoting message bodies #1930
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2089 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-01 14:45:10 +00:00
Jamis Buck
ca410998ab Encode multibyte characters correctly #1894
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2088 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-09-01 14:26:13 +00:00
Jamis Buck
dca4d4e86d Multipart messages specify a MIME-Version header automatically #2003 [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2038 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-22 23:53:04 +00:00
Jamis Buck
ae1e85200e Add a unified render method to ActionMailer (delegates to ActionView::Base#render)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2037 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-22 21:17:01 +00:00
Jamis Buck
516d920dc3 Fixture for tests in [2034]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2036 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-22 21:05:44 +00:00
Jamis Buck
b13efaf985 Look at content-location header (if available) to determine filename of attachments #1670
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2034 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-08-22 20:43:43 +00:00
Jamis Buck
eda1719470 ActionMailer::Base.deliver(email) had been accidentally removed, but was documented in the Rails book #1849
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1958 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-31 08:26:32 +00:00
Jamis Buck
bde3df2bec Correctly normalize newlines in outgoing emails before encoding the body [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1732 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-06 09:53:34 +00:00
Jamis Buck
e85369ed7a Added unit test to confirm that #1393 is fixed in HEAD
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1667 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 16:21:11 +00:00
Jamis Buck
06052cb34c Avoid adding nil values to mail headers #1392
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1666 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-04 16:11:22 +00:00
Jamis Buck
5c981528f2 Better multipart support with implicit multipart/alternative and sorting of subparts [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1586 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-07-01 20:43:40 +00:00
Jamis Buck
5ddffc8c24 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
2005-07-01 13:17:44 +00:00
Jamis Buck
24a8cb1e56 Normalize line endings in outgoing mail bodies to "\n" #1536 [John Long]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1576 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-30 21:40:43 +00:00
Jamis Buck
813a8b9d2a Allow template to be explicitly specified #1448 [tuxie@dekadance.se]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1575 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-30 21:21:54 +00:00
Jamis Buck
3b4eb7aece Allow specific "multipart/xxx" content-type to be set on multipart messages #1412 [Flurin Egger]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1493 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-24 12:15:45 +00:00
Jamis Buck
053cb22c17 Use the real charset for parts generated by a template, instead of the string "charset".
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1478 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-22 10:12:06 +00:00
Jamis Buck
996fa1526d Unquoted @ chars in received email headers are parsed properly in spite of RFC 822 (#1206)
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1476 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-22 09:59:14 +00:00
Jamis Buck
5ec990af9e Helper support for ActionMailer
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1446 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-16 11:39:29 +00:00
Jamis Buck
6cff8487ed Fixture for new test in [1395]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1396 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-08 10:29:17 +00:00
Jamis Buck
29d6d15fc3 Silently ignore Errno::EINVAL errors when converting between charsets. Some mail clients apprently send X-UNKNOWN to represent unknown charsets, and this caused the conversion to blow up.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1395 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-08 10:18:26 +00:00
Jamis Buck
5c2e0fe649 Add a test case for malformed email headers
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1391 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-06 16:47:20 +00:00
Jamis Buck
481d579734 Don't error while processing encoded attachment names #1340 [lon@speedymac.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1390 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-06 16:12:38 +00:00
Jamis Buck
cf1e2a84ff Handle parsing of recursively multipart messages
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1389 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-06 16:06:26 +00:00
Jamis Buck
508c26c0bb BCC headers are removed when sending via SMTP
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1387 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-06 09:32:52 +00:00
Jamis Buck
100fd72699 Added a "content_type" accessor to allow messages to explicitly specify a content-type other than "text/plain" (the default).
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1382 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-03 10:57:06 +00:00
Jamis Buck
887497b0bb Don't apply a charset to attachments. Wrap base64-encoded lines.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1381 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-06-03 09:05:06 +00:00
Jamis Buck
19da52d69d Ignore Iconv::IllegalSequence errors when converting text #1341 [lon@speedymac.com]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1374 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-30 23:09:50 +00:00
Jamis Buck
359caef33c A very thorough refactoring, resulting in new mail property setters and support for attachments and multipart messages.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1359 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-29 16:36:22 +00:00
David Heinemeier Hansson
ee6882614f Step cautiously around subheaders in TMail #1285 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1301 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-10 15:30:18 +00:00
David Heinemeier Hansson
9c92867102 Fix attachments and content-type problems #1276 [Jamis Buck] 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]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1300 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-10 13:40:26 +00:00
David Heinemeier Hansson
483931ea61 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] Added unquoting even if the iconv lib can't be loaded--in that case, only the charset conversion is skipped #1265 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1290 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-06 10:39:00 +00:00
David Heinemeier Hansson
ea85fb6322 Missing test data
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1276 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-02 17:18:53 +00:00
David Heinemeier Hansson
a2eb744dfb Added automatic decoding of base64 bodies #1214 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1275 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-05-02 17:15:21 +00:00
David Heinemeier Hansson
54cc595dff Improved address header processing
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1161 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-13 17:49:24 +00:00
David Heinemeier Hansson
d5cadfc110 Address parsing failed when the "to" (or "cc", or whatever) was an array. It was also too restrictive in the formats of the addresses #1097 [Jamis]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1149 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-13 04:44:58 +00:00
David Heinemeier Hansson
a67beac9d0 Dont quote the body
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1144 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-11 11:46:12 +00:00
David Heinemeier Hansson
256e800a01 Fixed quoting for all address headers, not just to #955 [Jamis Buck] Added that quoting to UTF-8 only happens if the characters used are in that range #955 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@1142 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-04-11 10:29:15 +00:00
David Heinemeier Hansson
cb69736a10 Made the unquoted subject and body the default
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@964 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-03-21 12:10:47 +00:00
David Heinemeier Hansson
3fad0cd06c Added support for charsets for both subject and body. The default charset is now UTF-8 #673 [Jamis Buck]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@699 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-02-19 21:51:16 +00:00
David Heinemeier Hansson
5f5b053ce8 Fixed that bcc and cc should be settable through @bcc and @cc -- not just @headers["Bcc"] and @headers["Cc"] #453 [Eric Hodel]. Fixed Action Mailer to be "warnings safe" so you can run with ruby -w and not get framework warnings #453 [Eric Hodel]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@399 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2005-01-13 13:05:51 +00:00
David Heinemeier Hansson
db045dbbf6 Initial
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
2004-11-24 01:04:44 +00:00